d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Ignore Warnings In Command Line > C++
Add Reply New Topic New Poll
Member
Posts: 23,516
Joined: Aug 3 2011
Gold: 3,575.00
Aug 10 2018 10:30am
Hey is there a way to disable it so it works without letting you know there's a warning? Been searching for a solution, they say to implement Pragma into my code but it's either I'm using the parameters wrong or the warning may actually be an issue?
Paying 100 fg for a solution that works

Code
Threads.cpp:43:2: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
sem_init(&Semaphore_For_Buffer, 0, Size_Of_Buffer);


1 warning generated.

To give more of an insight

This post was edited by Cocoo on Aug 10 2018 10:38am
Member
Posts: 23,516
Joined: Aug 3 2011
Gold: 3,575.00
Aug 10 2018 01:12pm
Maybe I was unclear, I'm using the terminal on a Mac to compile and run my programs. I don't persay have an "IDE"
Member
Posts: 23,516
Joined: Aug 3 2011
Gold: 3,575.00
Aug 12 2018 07:46am
I fixed it, finally got it to create an executable file that I could ./executable_file.name
Close
Member
Posts: 5,348
Joined: Sep 15 2017
Gold: Locked
Aug 18 2018 02:46am
if you're using "gcc" as compiler, you could have used the 'w' flag to tell the compiler to ignore warning
ex: gcc -w main.cpp

of just use the 'Wdeprecated-declarations' flag if you don't want to ignore all but only the type of warning caused by deprecated function usage (gcc -Wdeprecated-declarations main.cpp)
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll