Re: [PATCH] ssluse.c: Fixed compile error: conversion to 'int' from 'size_t'

2012-06-28 Thread Marc Hoersken
Hello everyone,

attached you will find two patches to fix the warnings I reported earlier.

Would be great if someone could do a second test and push afterwards.

Best regards,
Marc


0001-nss-Fixed-size_t-conversion-warnings.patch
Description: Binary data


0002-test-lib582-Fixed-size_t-conversion-warning.patch
Description: Binary data
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Re: [PATCH] ssluse.c: Fixed compile error: conversion to 'int' from 'size_t'

2012-06-28 Thread Marc Hoersken
 I've already seen your previous post from 20 hours ago. Please be
 patient it will be addressed shortly.

I am patient... I just thought that it would be a good idea to do the
patching myself..
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


Re: [PATCH] ssluse.c: Fixed compile error: conversion to 'int' from 'size_t'

2012-06-28 Thread Yang Tse
On Thu, Jun 28, 2012 at 4:11 PM, Marc Hoersken i...@marc-hoersken.de wrote:

 I am patient... I just thought that it would be a good idea to do the
 patching myself..

Fine, thanks.

0001-nss-Fixed-size_t-conversion-warnings.patch merged and pushed.

Afterwards I had to include warnless.h in nss.c now that
curlx_uztosi() and curlx_uztoui() are used in nss.c

0002-test-lib582-Fixed-size_t-conversion-warning.patch not good enough
fix. Widening from int to long is not enough given that there are
systems on which int and long have same size and we wouldn't fully
kill the warning.

To kill that warning, I've widened from int to ssize_t and used
curlx_sztosi() instead.

Thanks,
-- 
-=[Yang]=-
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


Re: [PATCH] ssluse.c: Fixed compile error: conversion to 'int' from 'size_t'

2012-06-27 Thread Yang Tse
Tatsuhiro Tsujikawa tatsuhir...@gmail.com wrote:

 The attached patch fixes the following compile error:

 ssluse.c: In function 'Curl_ossl_random':
 ssluse.c:2789:3: error: conversion to 'int' from 'size_t' may alter
 its value [-Werror=conversion]
 cc1: all warnings being treated as errors

I've fixed it diferently. Fix already pushed to repo.

Thanks,
-- 
-=[Yang]=-
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


Re: [PATCH] ssluse.c: Fixed compile error: conversion to 'int' from 'size_t'

2012-06-27 Thread Marc Hoersken
Hi Yang,

2012/6/27 Yang Tse yangs...@gmail.com
 I've fixed it diferently. Fix already pushed to repo.

could you apply the same fix to the following warnings, please?

goto problem 2
../.././lib/nss.c:1541: warning: conversion to 'int' from 'size_t' may
alter its value
../.././lib/nss.c: In function 'Curl_nss_md5sum':
goto problem 3
../.././lib/nss.c:1551: warning: conversion to 'unsigned int' from
'size_t' may alter its value
goto problem 4
../.././lib/nss.c:1552: warning: conversion to 'unsigned int' from
'size_t' may alter its value

goto problem 5
../../.././tests/libtest/lib582.c:179: warning: conversion to 'int'
from 'long int' may alter its value

http://curl.haxx.se/dev/log.cgi?id=20120627154557-28454

Thanks in advance!

Best regards,
Marc
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html