Category : warnings

what is this warning and how can I fix it? I am write a CUDA code for good features to track. warning: ‘cudaError_t cudaMemcpyToArray(cudaArray_t, size_t, size_t, const void*, size_t, cudaMemcpyKind)’ is deprecated [-Wdeprecated-declarations] this is a picture of above warning thanks. Source: Windows Que..

Read more

I can’t seem to get VC++’s #pragma warning to work in module interfaces. Has anything changed? Example: module; #pragma warning( push, 0 ) #include <Windows.h> #include <ntstatus.h> #pragma warning( pop ) export module WarningsTest; export void TestFn(); 1>Scanning sources for module dependencies… 1>Module.ixx 1>C:Program Files (x86)Windows KitsInclude.0.19041.0sharedntstatus.h(66,14): warning C4005: ‘STATUS_WAIT_0’: macro redefinition 1>C:Program Files (x86)Windows ..

Read more

Recently version 16.9.5 of Visual Studio 2019 has been released. It apparently introduced new warning: [[nodiscard]] __declspec(dllexport) bool foo(); //ok __declspec(dllexport) [[nodiscard]] bool bar(); // warning C5240: ‘nodiscard’: attribute is ignored in this syntactic position Actually I thought that both nodiscard and dllexport are attributes that can appear in any order, or it is not? ..

Read more

Visual Studio’s intellisense produces the following warnings: Severity Code Description Project File Line Suppression State Warning C26495 Variable ‘std::exception_ptr::_Data1’ is uninitialized. Always initialize a member variable (type.6). MD C:Program Files (x86)Microsoft Visual Studio19CommunityVCToolsMSVC.28.29910includeexception 216 Warning C26495 Variable ‘std::exception_ptr::_Data2’ is uninitialized. Always initialize a member variable (type.6). MD C:Program Files (x86)Microsoft Visual Studio19CommunityVCToolsMSVC.28.29910includeexception 216 Warning C26495 ..

Read more

#include<iostream> using namespace std; int main() { float a,b,hasil; char aritmatika; cout <<"Selamat datang di Program Calculator Sederhana n n"; //Memasukkan input dari user cout <<"Silahkan masukkan nilai pertamamu: "; cin >>a; cout <<"Pilih operator+,-,*,/: "; cin >>aritmatika; cout <<"Silahkan masukkan nilai keduamu: "; cin >>b; cout <<"n nHasil Perhitungan:nn"; cout <<a <<aritmatika <<b; if(aritmatika ..

Read more

I am analyzing a codebase with clang-tidy and see a warning I do not understand. The warning is invoked by the following lines of code: void fun(const QString& bar) { const char* c_format = bar.toStdString().c_str(); expand_some_macro(c_format); } c_format is passed around in the expanded macro which reads as follows: #define expand_some_macro(c_format) char buffer[MAX_SIZE]; va_list args; ..

Read more

I am quite new to C++ and it’s getting annoying with all the red linings. My code (snippet) below works, but it keeps highlighting my tuple and make_tuple with the following warnings: tuple is not a template and identifier "make_tuple" is undefined, respectively. What does this mean? Do I have to define anything anywhere? I ..

Read more