This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 36422459f0fc8293fb52d4818dc94c8342615a1c (commit) via 833048c796ea1e1edd87616fd55cc6d8b83c2e24 (commit) via af5118fc6050c831cac9fdb26e1d4a0f2d081626 (commit) from 8bfdadb7f739f7eb614d3c4f427a3d075a0669a1 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/36422459f0fc8293fb52d4818dc94c8342615...
commit 36422459f0fc8293fb52d4818dc94c8342615a1c Author: Cyril Hrubis metan@ucw.cz Date: Wed Dec 26 15:40:08 2012 +0100
all: Fix some warnings.
diff --git a/demos/c_simple/blittest.c b/demos/c_simple/blittest.c index 013bf07..5a80233 100644 --- a/demos/c_simple/blittest.c +++ b/demos/c_simple/blittest.c @@ -147,7 +147,7 @@ void print_instructions(void) printf(" P ............... pausen"); }
-int main(int argc, char *argv[]) +int main(void) { const char *sprite = "ball.ppm"; const char *backend_opts = "X11"; diff --git a/include/filters/GP_Sigma.h b/include/filters/GP_Sigma.h index 18275f0..a9e35e9 100644 --- a/include/filters/GP_Sigma.h +++ b/include/filters/GP_Sigma.h @@ -47,18 +47,21 @@ int GP_FilterSigmaEx(const GP_Context *src, GP_Size w_src, GP_Size h_src, GP_Context *dst, GP_Coord x_dst, GP_Coord y_dst, - int xrad, int yrad, int min, float sigma, + int xrad, int yrad, + unsigned int min, float sigma, GP_ProgressCallback *callback);
GP_Context *GP_FilterSigmaExAlloc(const GP_Context *src, GP_Coord x_src, GP_Coord y_src, GP_Size w_src, GP_Size h_src, - int xrad, int yrad, int min, float sigma, + int xrad, int yrad, + unsigned int min, float sigma, GP_ProgressCallback *callback);
static inline int GP_FilterSigma(const GP_Context *src, GP_Context *dst, - int xrad, int yrad, int min, float sigma, + int xrad, int yrad, + unsigned int min, float sigma, GP_ProgressCallback *callback) { return GP_FilterSigmaEx(src, 0, 0, src->w, src->h, @@ -67,7 +70,7 @@ static inline int GP_FilterSigma(const GP_Context *src,
static inline GP_Context *GP_FilterSigmaAlloc(const GP_Context *src, int xrad, int yrad, - int min, float sigma, + unsigned int min, float sigma, GP_ProgressCallback *callback) { return GP_FilterSigmaExAlloc(src, 0, 0, src->w, src->h, diff --git a/libs/filters/GP_Sigma.c b/libs/filters/GP_Sigma.c index 876e21d..2d1f6aa 100644 --- a/libs/filters/GP_Sigma.c +++ b/libs/filters/GP_Sigma.c @@ -37,7 +37,8 @@ static int GP_FilterSigma_Raw(const GP_Context *src, GP_Size w_src, GP_Size h_src, GP_Context *dst, GP_Coord x_dst, GP_Coord y_dst, - int xrad, int yrad, int min, float sigma, + int xrad, int yrad, + unsigned int min, float sigma, GP_ProgressCallback *callback) { int x, y; @@ -68,7 +69,7 @@ static int GP_FilterSigma_Raw(const GP_Context *src, for (x = 0; x < (int)w; x++) { int xi = GP_CLAMP(x_src + x - xrad, 0, (int)src->w - 1); - for (y = 0; y < ydiam; y++) { + for (y = 0; y < (int)ydiam; y++) { int yi = GP_CLAMP(y_src + y - yrad, 0, (int)src->h - 1);
GP_Pixel pix = GP_GetPixel_Raw_24BPP(src, xi, yi); @@ -206,7 +207,8 @@ int GP_FilterSigmaEx(const GP_Context *src, GP_Size w_src, GP_Size h_src, GP_Context *dst, GP_Coord x_dst, GP_Coord y_dst, - int xrad, int yrad, int min, float sigma, + int xrad, int yrad, + unsigned int min, float sigma, GP_ProgressCallback *callback) { GP_CHECK(src->pixel_type == dst->pixel_type); @@ -225,7 +227,8 @@ int GP_FilterSigmaEx(const GP_Context *src, GP_Context *GP_FilterSigmaExAlloc(const GP_Context *src, GP_Coord x_src, GP_Coord y_src, GP_Size w_src, GP_Size h_src, - int xrad, int yrad, int min, float sigma, + int xrad, int yrad, + unsigned int min, float sigma, GP_ProgressCallback *callback) { int ret; diff --git a/libs/loaders/GP_TmpFile.c b/libs/loaders/GP_TmpFile.c index cacbf32..2796652 100644 --- a/libs/loaders/GP_TmpFile.c +++ b/libs/loaders/GP_TmpFile.c @@ -39,7 +39,7 @@ GP_Context *GP_LoadTmpFile(const char *src_path, GP_ProgressCallback *callback) enum GP_PixelType pixel_type; char sig[sizeof(file_sig)]; GP_Context *ret; - int err; + int err, i;
f = fopen(src_path, "r");
@@ -58,15 +58,15 @@ GP_Context *GP_LoadTmpFile(const char *src_path, GP_ProgressCallback *callback) goto err0; }
- /* Read context metadata */ - fread(&w, sizeof(w), 1, f); - fread(&h, sizeof(h), 1, f); - fread(&offset, sizeof(offset), 1, f); - fread(&bpr, sizeof(bpr), 1, f); - fread(&pixel_type, sizeof(pixel_type), 1, f); - fread(&flags, 1, 1, f); + /* Read context metadata */ + i = fread(&w, sizeof(w), 1, f); + i += fread(&h, sizeof(h), 1, f); + i += fread(&offset, sizeof(offset), 1, f); + i += fread(&bpr, sizeof(bpr), 1, f); + i += fread(&pixel_type, sizeof(pixel_type), 1, f); + i += fread(&flags, 1, 1, f);
- if (ferror(f)) { + if (i != 6 || ferror(f)) { err = EIO; goto err0; } @@ -121,7 +121,7 @@ int GP_SaveTmpFile(const GP_Context *src, const char *dst_path, { FILE *f; int err; - uint32_t y; + uint32_t y, i;
f = fopen(dst_path, "w");
@@ -129,14 +129,14 @@ int GP_SaveTmpFile(const GP_Context *src, const char *dst_path, return 1;
/* Write a signature */ - fwrite(file_sig, sizeof(file_sig), 1, f); + i = fwrite(file_sig, sizeof(file_sig), 1, f);
/* Write block of metadata */ - fwrite(&src->w, sizeof(src->w), 1, f); - fwrite(&src->h, sizeof(src->h), 1, f); - fwrite(&src->offset, sizeof(src->offset), 1, f); - fwrite(&src->bytes_per_row, sizeof(src->bytes_per_row), 1, f); - fwrite(&src->pixel_type, sizeof(src->pixel_type), 1, f); + i += fwrite(&src->w, sizeof(src->w), 1, f); + i += fwrite(&src->h, sizeof(src->h), 1, f); + i += fwrite(&src->offset, sizeof(src->offset), 1, f); + i += fwrite(&src->bytes_per_row, sizeof(src->bytes_per_row), 1, f); + i += fwrite(&src->pixel_type, sizeof(src->pixel_type), 1, f);
uint8_t flags = 0; @@ -149,7 +149,12 @@ int GP_SaveTmpFile(const GP_Context *src, const char *dst_path, if (src->y_swap) flags |= 0x04;
- fwrite(&flags, 1, 1, f); + i += fwrite(&flags, 1, 1, f); + + if (i != 7) { + err = EIO; + goto err1; + }
/* And pixels */ for (y = 0; y < src->h; y++) { diff --git a/pylib/gfxprim/core/core.i b/pylib/gfxprim/core/core.i index c59ae6c..89c0301 100644 --- a/pylib/gfxprim/core/core.i +++ b/pylib/gfxprim/core/core.i @@ -38,7 +38,7 @@ ERROR_ON_NULL(GP_ColorToColorName); %inline %{ const GP_PixelTypeDescription *GP_PixelTypes_access(GP_PixelType no) { - if (no < 0 || no >= GP_PIXEL_MAX) no = GP_PIXEL_UNKNOWN; + if ((signed)no < 0 || no >= GP_PIXEL_MAX) no = GP_PIXEL_UNKNOWN; return &GP_PixelTypes[no]; } %} diff --git a/tests/filters/LinearConvolution.c b/tests/filters/LinearConvolution.c index 0264ddd..42ac872 100644 --- a/tests/filters/LinearConvolution.c +++ b/tests/filters/LinearConvolution.c @@ -114,7 +114,7 @@ static int test_v_lin_conv_box_3_raw(void) if (ret != TST_SUCCESS) return ret; - GP_SetDebugLevel(10); +// GP_SetDebugLevel(10);
/* Apply the convolution */ float kernel[] = {1, 1, 1};
http://repo.or.cz/w/gfxprim.git/commit/833048c796ea1e1edd87616fd55cc6d8b83c2...
commit 833048c796ea1e1edd87616fd55cc6d8b83c2e24 Author: Cyril Hrubis metan@ucw.cz Date: Wed Dec 26 15:34:47 2012 +0100
pywrap: loaders: Ignore GP_Loader structure.
Don't generate accessors for GP_Loader structure members.
diff --git a/pylib/gfxprim/loaders/loaders.i b/pylib/gfxprim/loaders/loaders.i index f72a3e8..33a2fbd 100644 --- a/pylib/gfxprim/loaders/loaders.i +++ b/pylib/gfxprim/loaders/loaders.i @@ -6,6 +6,8 @@ #include "loaders/GP_Loaders.h" %}
+%ignore GP_Loader; + %import ../core/core.i
ERROR_ON_NULL(GP_LoadImage);
http://repo.or.cz/w/gfxprim.git/commit/af5118fc6050c831cac9fdb26e1d4a0f2d081...
commit af5118fc6050c831cac9fdb26e1d4a0f2d081626 Author: Cyril Hrubis metan@ucw.cz Date: Wed Dec 26 15:20:28 2012 +0100
tests: framework: Use more portable posix_memalign.
diff --git a/tests/framework/tst_alloc_barriers.c b/tests/framework/tst_alloc_barriers.c index 315480e..fb745b6 100644 --- a/tests/framework/tst_alloc_barriers.c +++ b/tests/framework/tst_alloc_barriers.c @@ -31,10 +31,9 @@ void *tst_alloc_barrier_right(size_t size) { size_t pagesize = sysconf(_SC_PAGESIZE); size_t pages = size/pagesize + !!(size%pagesize) + 1; - - char *buf = memalign(pagesize, pages * pagesize); - - if (buf == NULL) + char *buf; + + if (posix_memalign((void*)&buf, pagesize, pages * pagesize)) return NULL;
/* @@ -70,9 +69,9 @@ void *tst_alloc_barrier_left(size_t size) size_t pagesize = sysconf(_SC_PAGESIZE); size_t pages = size/pagesize + !!(size%pagesize) + 1;
- char *buf = memalign(pagesize, pages * pagesize); - - if (buf == NULL) + char *buf; + + if (posix_memalign((void*)&buf, pagesize, pages * pagesize)) return NULL;
/*
-----------------------------------------------------------------------
Summary of changes: demos/c_simple/blittest.c | 2 +- include/filters/GP_Sigma.h | 11 ++++++--- libs/filters/GP_Sigma.c | 11 ++++++--- libs/loaders/GP_TmpFile.c | 39 +++++++++++++++++++-------------- pylib/gfxprim/core/core.i | 2 +- pylib/gfxprim/loaders/loaders.i | 2 + tests/filters/LinearConvolution.c | 2 +- tests/framework/tst_alloc_barriers.c | 13 +++++------ 8 files changed, 47 insertions(+), 35 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.