Changeset 3484 for libcaca/trunk


Ignore:
Timestamp:
May 19, 2009, 10:42:40 PM (10 years ago)
Author:
Sam Hocevar
Message:

Fix a few DOS compilation warnings.

Location:
libcaca/trunk/caca
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/dirty.c

    r3471 r3484  
    5858 *
    5959 *  \param cv A libcaca canvas.
    60  *  \param index The requested rectangle index.
     60 *  \param r The requested rectangle index.
    6161 *  \param xmin A pointer to an integer where the leftmost edge of the
    6262 *              dirty rectangle will be stored.
     
    6969 *  \return 0 in case of success, -1 if an error occurred.
    7070 */
    71 int caca_get_dirty_rectangle(caca_canvas_t *cv, int index,
     71int caca_get_dirty_rectangle(caca_canvas_t *cv, int r,
    7272                             int *xmin, int *ymin, int *xmax, int *ymax)
    7373{
    74     if(index < 0 || index >= cv->ndirty)
     74    if(r < 0 || r >= cv->ndirty)
    7575    {
    7676        seterrno(EINVAL);
  • libcaca/trunk/caca/figfont.c

    r3130 r3484  
    391391        else
    392392        {
     393            unsigned int tmp;
     394
    393395            if(caca_file_gets(f, buf, 2048) == NULL)
    394396                break;
     
    416418            }
    417419
    418             if(buf[1] == 'x')
    419                 sscanf(buf, "%x", &ff->lookup[ff->glyphs * 2]);
    420             else
    421                 sscanf(buf, "%u", &ff->lookup[ff->glyphs * 2]);
     420            sscanf(buf, buf[1] == 'x' ? "%x" : "%u", &tmp);
     421            ff->lookup[ff->glyphs * 2] = tmp;
    422422        }
    423423
Note: See TracChangeset for help on using the changeset viewer.