Fix compiler warnings (VS 2019)

Found with warning level: /W3
This commit is contained in:
Albrecht Schlosser 2024-12-10 23:12:22 +01:00
parent 5af62bc565
commit 6784ae807c
3 changed files with 5 additions and 5 deletions

View File

@ -1609,7 +1609,7 @@ content key keyboard layout
} else {
Fl::e_text = ( (Fl::e_state & FL_SHIFT) ? plus_other_char_utf8 : (char*)"+" );
}
Fl::e_length = strlen(Fl::e_text);
Fl::e_length = (int)strlen(Fl::e_text);
}
}
// end of processing of the +-containing key

View File

@ -154,7 +154,7 @@ int Fl_PDF_GDI_File_Surface::begin_job(const char *defaultfname, char **perr_mes
char *buffer = new char[count];
DEVMODEA *pDevMode = (DEVMODEA*)buffer;
memset(buffer, 0, count);
pDevMode->dmSize = count;
pDevMode->dmSize = (WORD)count;
count = DocumentPropertiesA(hwndOwner, hPr2, pdf_printer_name_, pDevMode, NULL, DM_OUT_BUFFER | DM_IN_PROMPT);
ClosePrinter(hPr2);
if (count == IDCANCEL || count < 0) { delete[] buffer; return 1; }
@ -171,7 +171,7 @@ int Fl_PDF_GDI_File_Surface::begin_job(const char *defaultfname, char **perr_mes
wchar_t docName [256];
wchar_t outName [256];
fl_utf8towc("FLTK", 4, docName, 256);
fl_utf8towc(fnfc.filename(), strlen(fnfc.filename()), outName, 256);
fl_utf8towc(fnfc.filename(), (unsigned int)strlen(fnfc.filename()), outName, 256);
memset(&di, 0, sizeof(DOCINFOW));
di.cbSize = sizeof(DOCINFOW);
di.lpszDocName = (LPCWSTR)docName;
@ -231,7 +231,7 @@ int Fl_PDF_GDI_File_Surface::begin_document(const char* outfname,
di.cbSize = sizeof(DOCINFOW);
di.lpszDocName = (LPCWSTR)docName;
di.lpszOutput = (LPCWSTR)outName;
fl_utf8towc(outfname, strlen(outfname), outName, 256);
fl_utf8towc(outfname, (unsigned int)strlen(outfname), outName, 256);
err = StartDocW(hPr, &di);
if (err <= 0) {
DWORD dw = GetLastError();

View File

@ -66,7 +66,7 @@
*/
static float tb_project_to_sphere(float, float, float);
static void normalize_quat(float [4]);
static float max_velocity = 0.1;
static float max_velocity = 0.1f;
void
vzero(float *v)