My program loads some things from a ini file using GetPrivateProfileString. One of the things it loads is the name of the current Color Scheme file (.ocl).
Once it loads this name to a string, my program should use GetPrivateProfileString to load everything from this ColorScheme file.
Code:
int Ini_Read() {
...
...
GetPrivateProfileString("ColorScheme", "current", "default.ocl", CurColorScheme, 60, ".\\obs.ini");
...
return 0;
}
int LoadColorScheme() {
...
...
GetPrivateProfileString("mainwindow", "mwbgcolor", "0,0,0", (LPTSTR)mwbgcolorref, 12, (LPCTSTR)CurColorScheme);
...
return 0;
}
Ini_Read is working perfectly and loading all key values to the respective vars, I could see that through debugging.
The problem is in this line of LoadColorScheme. GCC is telling me
C:\project12\setcolors.c
[Warning] passing arg 4 of `GetPrivateProfileStringA' makes pointer from integer without a cast
[Warning] passing arg 6 of `GetPrivateProfileStringA' makes pointer from integer without a cast
CurColorScheme is a global at main.h.
char CurColorScheme[61];
mwbgcolorref is a global COLORREF at main.h.
COLORREF mwbgcolorref;
Ini_Read is throwing ".\\SomeScheme.ocl" to CurColorScheme which is correct. It´s a totally acceptable path+filename for LoadColorScheme´s GetPrivateProfileString line...
Does anyone knows how I can solve that problems?
Thanks