sanjeetchau / Store-Inventory-Database

Departmental-store-like stocks and inventories database storage and ease of searching. (Along with, possibly, customer purchase history.)
MIT License
0 stars 0 forks source link

Compiler(clang-llvm) indicates deprecated functions being used. [Indicating my reference book to prolly be outdated.] #3

Open sanjeetchau opened 2 years ago

sanjeetchau commented 2 years ago

Should I follow the compiler suggestions, even though the programs seem logically fine? I guess I'll have to:

sanjeetchau commented 2 years ago

Full compilation message:

`❯ clang .\main.c .\browse_inventory.c .\entrypoint.c .\login_portal.c .\staff_page.c -o clangout_proj.exe .\login_portal.c:36:7: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] fp = fopen("./staff_credentials.csv", "r"); ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here _Checkreturn _CRT_INSECURE_DEPRECATE(fopen_s) ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\vcruntime.h:337:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'

define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \

                                                  ^

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\vcruntime.h:327:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'

define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))

                                          ^

.\login_portal.c:78:5: warning: 'strncat' is deprecated: This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] strncat(txt_stream1, &ch, 1); ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\string.h:262:1: note: 'strncat' has been explicitly marked deprecated here DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX( ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:1921:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX' _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType cdecl _FuncName(_SalAttributeDst DstType *... ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\vcruntime.h:337:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'

define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \

                                                  ^

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\vcruntime.h:327:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'

define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))

                                          ^

.\login_portal.c:85:5: warning: 'strncat' is deprecated: This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] strncat(txt_stream2, &ch, 1); ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\string.h:262:1: note: 'strncat' has been explicitly marked deprecated here DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX( ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:1921:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX' _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType cdecl _FuncName(_SalAttributeDst DstType *... ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\vcruntime.h:337:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'

define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \

                                                  ^

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\vcruntime.h:327:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'

define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))

                                          ^

3 warnings generated.`