mirror of https://github.com/fltk/fltk
Fix more compiler warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
f0f41708a4
commit
020a96b4a8
2
FL/Fl.H
2
FL/Fl.H
|
@ -23,6 +23,8 @@
|
|||
#ifndef Fl_H
|
||||
# define Fl_H
|
||||
|
||||
#include <FL/Fl_Export.H>
|
||||
|
||||
#include <FL/Fl_System_Driver.H> // for FL_SOCKET
|
||||
#ifdef FLTK_HAVE_CAIRO
|
||||
# include <FL/Fl_Cairo.H>
|
||||
|
|
|
@ -432,7 +432,7 @@ void CodeViewer::draw()
|
|||
{
|
||||
// Tricking Fl_Text_Display into using bearable colors for this specific task
|
||||
Fl_Color c = Fl::get_color(FL_SELECTION_COLOR);
|
||||
Fl::set_color(FL_SELECTION_COLOR, fl_color_average(FL_BACKGROUND_COLOR, FL_FOREGROUND_COLOR, 0.9));
|
||||
Fl::set_color(FL_SELECTION_COLOR, fl_color_average(FL_BACKGROUND_COLOR, FL_FOREGROUND_COLOR, 0.9f));
|
||||
CodeEditor::draw();
|
||||
Fl::set_color(FL_SELECTION_COLOR, c);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ void Fl_PNG_Image::load_png_(const char *name_png, const unsigned char *buffer_p
|
|||
FILE *fp = NULL; // File pointer
|
||||
int channels; // Number of color channels
|
||||
png_structp pp; // PNG read pointer
|
||||
png_infop info; // PNG info pointers
|
||||
png_infop info = 0; // PNG info pointers
|
||||
png_bytep *rows;// PNG row pointers
|
||||
fl_png_memory png_mem_data;
|
||||
int from_memory = (buffer_png != NULL); // true if reading image from memory
|
||||
|
|
|
@ -269,7 +269,7 @@ int Fl_Slider::handle(int event, int X, int Y, int W, int H) {
|
|||
}
|
||||
|
||||
int xx = mx-offcenter;
|
||||
double v;
|
||||
double v = 0;
|
||||
char tryAgain = 1;
|
||||
while (tryAgain)
|
||||
{
|
||||
|
|
|
@ -738,7 +738,7 @@ void Fl::paste(Fl_Widget &receiver, int clipboard, const char *type) {
|
|||
}
|
||||
else if (strcmp(type, Fl::clipboard_image) == 0) { // we want an image from clipboard
|
||||
uchar *rgb = NULL;
|
||||
int width, height, depth;
|
||||
int width = 0, height = 0, depth = 0;
|
||||
if ( (h = GetClipboardData(CF_DIB)) ) { // if there's a DIB in clipboard
|
||||
LPBITMAPINFO lpBI = (LPBITMAPINFO)GlobalLock(h) ;
|
||||
width = lpBI->bmiHeader.biWidth; // bitmap width & height
|
||||
|
@ -1481,7 +1481,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
|
||||
static int fake_X_wm_style(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by, DWORD style, DWORD styleEx,
|
||||
int w_maxw, int w_minw, int w_maxh, int w_minh, uchar w_size_range_set) {
|
||||
int W, H, xoff, yoff, dx, dy;
|
||||
int W = 0, H = 0, xoff = 0, yoff = 0, dx = 0, dy = 0;
|
||||
int ret = bx = by = bt = 0;
|
||||
|
||||
int fallback = 1;
|
||||
|
@ -1558,7 +1558,7 @@ static int fake_X_wm_style(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, in
|
|||
//Proceed to positioning the window fully inside the screen, if possible
|
||||
//Find screen that contains most of the window
|
||||
//FIXME: this ought to be the "work area" instead of the entire screen !
|
||||
int scr_x, scr_y, scr_w, scr_h;
|
||||
int scr_x = 0, scr_y = 0, scr_w = 0, scr_h = 0;
|
||||
Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y, W, H);
|
||||
//Make border's lower right corner visible
|
||||
if (scr_x+scr_w < X+W) X = scr_x+scr_w - W;
|
||||
|
|
|
@ -33,7 +33,7 @@ CREATE_EXAMPLE(colbrowser colbrowser.cxx "fltk;fltk_forms")
|
|||
CREATE_EXAMPLE(color_chooser color_chooser.cxx fltk)
|
||||
CREATE_EXAMPLE(cursor cursor.cxx fltk)
|
||||
CREATE_EXAMPLE(curve curve.cxx fltk)
|
||||
CREATE_EXAMPLE(demo demo.cxx "fltk;fltk_forms")
|
||||
CREATE_EXAMPLE(demo demo.cxx fltk)
|
||||
CREATE_EXAMPLE(device device.cxx fltk)
|
||||
CREATE_EXAMPLE(doublebuffer doublebuffer.cxx fltk)
|
||||
CREATE_EXAMPLE(editor editor.cxx fltk)
|
||||
|
|
|
@ -1029,7 +1029,7 @@ Sudoku::load_game() {
|
|||
|
||||
sprintf(name, "readonly%d.%d", j, k);
|
||||
prefs_.get(name, val, 0);
|
||||
cell->readonly(val);
|
||||
cell->readonly(val != 0);
|
||||
|
||||
if (val) cell->color(FL_GRAY);
|
||||
else {
|
||||
|
@ -1090,7 +1090,7 @@ Sudoku::new_game(time_t seed) {
|
|||
|
||||
// Generate a new (valid) Sudoku grid...
|
||||
seed_ = seed;
|
||||
srand(seed);
|
||||
srand((unsigned int)seed);
|
||||
|
||||
memset(grid_values_, 0, sizeof(grid_values_));
|
||||
|
||||
|
@ -1181,7 +1181,7 @@ Sudoku::new_game(time_t seed) {
|
|||
// Return the next available value for a cell...
|
||||
int
|
||||
Sudoku::next_value(SudokuCell *c) {
|
||||
int j, k, m, n;
|
||||
int j = 0, k = 0, m = 0, n = 0;
|
||||
|
||||
|
||||
for (j = 0; j < 9; j ++) {
|
||||
|
|
Loading…
Reference in New Issue