I am getting the following compiler warning when I use the following to skip a line when reading a file with fscanf with C:
warning: too many arguments for format [-Wformat-extra-args]
fscanf(myFile, "%*[^\n]\n", NULL);
The program works perfectly fine. However, I wonder if there is an approach to skip a line in a file that is as minimalistic as the above and does not give compiler warnings (or a simple edit to the above would be ideal)? This approach to skipping a line was taken from How to skip the first line when fscanning a .txt file? where there is no mention of any such warning. Other methods of skipping a line are presented in this previous question; however, none are as minimalistic as the above.