tddec-code
tddec-code copied to clipboard
Compile warning fix
On compile in the /code/ directory with a newer compiler you will get:
compiling DvRecorder.c src/dvr/DvRecorder.c: In function ‘DvRecorder_RestorePrograms’: src/dvr/DvRecorder.c:39:1: error: C++ style comments are not allowed in ISO C90 [-Werror] // programs = programs; ^ src/dvr/DvRecorder.c:39:1: error: (this will be reported only once per input file) [-Werror] cc1: all warnings being treated as errors make[1]: *** [objs/src/dvr/DvRecorder.o] Error 1 make[1]: Leaving directory `/home/dmiller/scratch/tddec-code/code' make: *** [all] Error 2
Changing from C++ style comments to C style fixes.
⟫ gcc --version gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc.
diff --git a/code/src/dvr/DvRecorder.c b/code/src/dvr/DvRecorder.c index db06bb1..2ad9745 100644 --- a/code/src/dvr/DvRecorder.c +++ b/code/src/dvr/DvRecorder.c @@ -36,7 +36,7 @@ void DvrRecorder_Create(void)
void DvRecorder_RestorePrograms(DvRecorder * programs) { -// programs = programs; +/* programs = programs;*/ }
void DvRecorder_Destroy(void)