mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Eliminate compiler warnings
This commit is contained in:
parent
1869755fe5
commit
1a214a02c5
@ -675,7 +675,7 @@ il_size(il_container *ic)
|
|||||||
if (ic->dest_height == 0) ic->dest_height = 1;
|
if (ic->dest_height == 0) ic->dest_height = 1;
|
||||||
|
|
||||||
/* Determine if the image will be displayed at its natural size. */
|
/* Determine if the image will be displayed at its natural size. */
|
||||||
if (ic->dest_width == (int)src_width && ic->dest_height == (int)src_height)
|
if (ic->dest_width == src_width && ic->dest_height == src_height)
|
||||||
ic->natural_size = PR_TRUE;
|
ic->natural_size = PR_TRUE;
|
||||||
|
|
||||||
/* Check that the target image dimensions are reasonable. */
|
/* Check that the target image dimensions are reasonable. */
|
||||||
@ -980,7 +980,6 @@ IL_StreamWrite(il_container *ic, const unsigned char *str, int32 len)
|
|||||||
int
|
int
|
||||||
IL_StreamFirstWrite(il_container *ic, const unsigned char *str, int32 len)
|
IL_StreamFirstWrite(il_container *ic, const unsigned char *str, int32 len)
|
||||||
{
|
{
|
||||||
int ret =0;
|
|
||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
PR_ASSERT(ic);
|
PR_ASSERT(ic);
|
||||||
@ -1378,7 +1377,6 @@ void
|
|||||||
il_image_complete(il_container *ic)
|
il_image_complete(il_container *ic)
|
||||||
{
|
{
|
||||||
NI_PixmapHeader *src_header = ic->src_header;
|
NI_PixmapHeader *src_header = ic->src_header;
|
||||||
IL_GroupContext *img_cx = ic->img_cx;
|
|
||||||
IL_DisplayType display_type = ic->display_type;
|
IL_DisplayType display_type = ic->display_type;
|
||||||
ilINetReader *reader;
|
ilINetReader *reader;
|
||||||
|
|
||||||
@ -1454,20 +1452,20 @@ il_image_complete(il_container *ic)
|
|||||||
/* Only loop if the image stream is available locally.
|
/* Only loop if the image stream is available locally.
|
||||||
Also, if the user hit the "stop" button, don't
|
Also, if the user hit the "stop" button, don't
|
||||||
allow the animation to loop. */
|
allow the animation to loop. */
|
||||||
#ifdef NU_CACHE
|
#ifdef NU_CACHE
|
||||||
if ((ic->net_cx->IsLocalFileURL(ic->fetch_url) ||
|
if ((ic->net_cx->IsLocalFileURL(ic->fetch_url) ||
|
||||||
ic->net_cx->IsURLInCache(netRequest)) &&
|
ic->net_cx->IsURLInCache(netRequest)) &&
|
||||||
(!il_image_stopped(ic)) &&
|
(!il_image_stopped(ic)) &&
|
||||||
ic->net_cx &&
|
ic->net_cx &&
|
||||||
(display_type == IL_Console))
|
(display_type == IL_Console))
|
||||||
#else
|
#else
|
||||||
if ((ic->net_cx->IsLocalFileURL(ic->fetch_url) ||
|
if ((ic->net_cx->IsLocalFileURL(ic->fetch_url) ||
|
||||||
ic->net_cx->IsURLInMemCache(netRequest) ||
|
ic->net_cx->IsURLInMemCache(netRequest) ||
|
||||||
ic->net_cx->IsURLInDiskCache(netRequest)) &&
|
ic->net_cx->IsURLInDiskCache(netRequest)) &&
|
||||||
(!il_image_stopped(ic)) &&
|
(!il_image_stopped(ic)) &&
|
||||||
ic->net_cx &&
|
ic->net_cx &&
|
||||||
(display_type == IL_Console))
|
(display_type == IL_Console))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (!ic->is_looping) {
|
if (!ic->is_looping) {
|
||||||
/* If this is the end of the first pass of the
|
/* If this is the end of the first pass of the
|
||||||
@ -1796,7 +1794,7 @@ il_setup_icon_table(void)
|
|||||||
il_icon_table[inum++] = il_hash("internal-attachment-icon");
|
il_icon_table[inum++] = il_hash("internal-attachment-icon");
|
||||||
il_icon_table[inum++] = IL_MSG_ATTACH;
|
il_icon_table[inum++] = IL_MSG_ATTACH;
|
||||||
|
|
||||||
PR_ASSERT(inum <= (sizeof(il_icon_table) / sizeof(il_icon_table[0])));
|
PR_ASSERT(inum <= (int)(sizeof(il_icon_table) / sizeof(il_icon_table[0])));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1808,7 +1806,7 @@ il_internal_image(const char *image_url)
|
|||||||
if (il_icon_table[0]==0)
|
if (il_icon_table[0]==0)
|
||||||
il_setup_icon_table();
|
il_setup_icon_table();
|
||||||
|
|
||||||
for (i=0; i< (sizeof(il_icon_table) / sizeof(il_icon_table[0])); i++)
|
for (i=0; i < (int)(sizeof(il_icon_table) / sizeof(il_icon_table[0])); i++)
|
||||||
{
|
{
|
||||||
if (il_icon_table[i<<1] == hash)
|
if (il_icon_table[i<<1] == hash)
|
||||||
{
|
{
|
||||||
@ -1840,7 +1838,6 @@ IL_GetImage(const char* image_url,
|
|||||||
int req_depth = img_cx->color_space->pixmap_depth;
|
int req_depth = img_cx->color_space->pixmap_depth;
|
||||||
int err;
|
int err;
|
||||||
int is_view_image;
|
int is_view_image;
|
||||||
int is_internal_external_reconnect = FALSE;
|
|
||||||
|
|
||||||
/* Create a new instance for this image request. */
|
/* Create a new instance for this image request. */
|
||||||
image_req = PR_NEWZAP(IL_ImageReq);
|
image_req = PR_NEWZAP(IL_ImageReq);
|
||||||
@ -1961,7 +1958,7 @@ IL_GetImage(const char* image_url,
|
|||||||
//PR_FREEIF(image_req);
|
//PR_FREEIF(image_req);
|
||||||
/* This takes the image_req out of the ic client list,
|
/* This takes the image_req out of the ic client list,
|
||||||
frees image_req->new_cx, frees image_req.*/
|
frees image_req->new_cx, frees image_req.*/
|
||||||
int ret = il_delete_client(ic, image_req);
|
il_delete_client(ic, image_req);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1998,7 +1995,7 @@ IL_GetImage(const char* image_url,
|
|||||||
/* This takes the image_req out of the ic client list,
|
/* This takes the image_req out of the ic client list,
|
||||||
frees image_req->new_cx, frees image_req.
|
frees image_req->new_cx, frees image_req.
|
||||||
*/
|
*/
|
||||||
int ret = il_delete_client(ic, image_req);
|
il_delete_client(ic, image_req);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -2021,7 +2018,7 @@ IL_GetImage(const char* image_url,
|
|||||||
/* This takes the image_req out of the ic client list,
|
/* This takes the image_req out of the ic client list,
|
||||||
frees image_req->new_cx, frees image_req.
|
frees image_req->new_cx, frees image_req.
|
||||||
*/
|
*/
|
||||||
int ret = il_delete_client(ic, image_req);
|
il_delete_client(ic, image_req);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
err = ic->net_cx->GetURL(url, cache_reload_policy, reader);
|
err = ic->net_cx->GetURL(url, cache_reload_policy, reader);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
/* if.h --- Top-level image library internal routines
|
/* if.h --- Top-level image library internal routines
|
||||||
*
|
*
|
||||||
* $Id: if.h,v 3.9 1999/08/19 22:18:44 pnunn%netscape.com Exp $
|
* $Id: if.h,v 3.10 1999/09/25 19:59:42 kipp%netscape.com Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _if_h
|
#ifndef _if_h
|
||||||
@ -224,7 +224,7 @@ struct il_container_struct {
|
|||||||
int forced;
|
int forced;
|
||||||
uint32 content_length;
|
uint32 content_length;
|
||||||
|
|
||||||
int dest_width, dest_height; /* Target dimensions of the image */
|
uint32 dest_width, dest_height; /* Target dimensions of the image */
|
||||||
PRPackedBool natural_size; /* True if the image is decoded to its natural
|
PRPackedBool natural_size; /* True if the image is decoded to its natural
|
||||||
size. */
|
size. */
|
||||||
PRPackedBool aspect_distorted; /* True if the image undergoes aspect ratio
|
PRPackedBool aspect_distorted; /* True if the image undergoes aspect ratio
|
||||||
|
Loading…
Reference in New Issue
Block a user