Skip to content

Commit

Permalink
Fix compiler warnings (VS 2019)
Browse files Browse the repository at this point in the history
Found with warning level: /W3
  • Loading branch information
Albrecht Schlosser committed Dec 10, 2024
1 parent 5af62bc commit 6784ae8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Fl_win32.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/trackball.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6784ae8

Please sign in to comment.