add -Wextra and remove a lot of warnings for C code#8916
add -Wextra and remove a lot of warnings for C code#8916uecker wants to merge 9 commits intoAlexeyAB:masterfrom
Conversation
|
What is the difference between this PR and the previous one PR #8915 ? |
|
None really, the previous one was based on the master branch of my fork and it seems Github still does not allow one to change this for a pull request, so I closed the old one and recreated it using a new branch. In my fork I will go on and remove a lot of things to make a minimalistic C library with just the core functionality. |
|
I want to reiterate for anyone else who makes it here that the last few years worth of bug fixes, CUDA/cuDNN crash fixes, performance enhancements, etc..., are only in the new Darknet/YOLO repo here: https://github.com/hank-ai/darknet#table-of-contents |
|
@stephanecharette I already told you to please avoid spamming everywhere your repo, the link in the readme is more than enough. Also because "last few years" is maybe an exaggeration, commits are still made here, but still this repo does not receive all the love it might deserve. |
src/box.c
Outdated
| { | ||
| //IOU, GIOU, MSE, DIOU, CIOU | ||
| switch(iou_kind) { | ||
| case MSE: assert(0); |
There was a problem hiding this comment.
can you please align this better with the surrounding lines?
src/classifier.c
Outdated
| while(1){ | ||
| if(filename){ | ||
| strncpy(input, filename, 256); | ||
| strncpy(input, filename, 255); |
|
|
||
| ifeq ($(USE_CPP), 1) | ||
| # C is not C++ | ||
| CFLAGS+=-fpermissive -Wno-write-strings |
There was a problem hiding this comment.
fpermissive really necessary?
There was a problem hiding this comment.
I guess one could avoid it, but then one can not write idiomatic C. I would recommend to remove the USE_CPP flag anyway. What is the benefit? That C++ does better type checking is not true anymore for a long time.
This is for people who need / want the C version of the code.