Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Thu, 8 Mar 2012 15:25:53 +0100 Vincent Torri said: i see u did it already! thnx! :) > On Thu, Mar 8, 2012 at 3:22 PM, Vincent Torri wrote: > > On Thu, Mar 8, 2012 at 2:54 PM, Enlightenment SVN > > wrote: > >> Log: > >> From: cnook > >> Subject: [E-devel] [Patch][Eina] eina_file_win32 - using > >> eina_file_statat(); > >> > >> On windows, Elementary gives build error. cause.. > >> The elm_config.c uses eina_file_statat(); but It is not in the > >> eina_file_win32.c > >> So the attached patch comes. Please keep the patch in the up stream. > >> Thanks. > >> > >> > >> > >> Author: raster > >> Date: 2012-03-08 05:54:01 -0800 (Thu, 08 Mar 2012) > >> New Revision: 69058 > >> Trac: http://trac.enlightenment.org/e/changeset/69058 > >> > >> Modified: > >> trunk/eina/src/lib/eina_file_win32.c > >> > >> Modified: trunk/eina/src/lib/eina_file_win32.c > >> === > >> --- trunk/eina/src/lib/eina_file_win32.c 2012-03-08 13:51:58 UTC > >> (rev 69057) +++ trunk/eina/src/lib/eina_file_win32.c 2012-03-08 > >> 13:54:01 UTC (rev 69058) @@ -1154,3 +1154,34 @@ > >> on_exit: > >> eina_lock_release(&file->lock); > >> } > >> + > >> +EAPI int > >> +eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat > >> *st) +{ > >> + WIN32_FILE_ATTRIBUTE_DATA fad; > >> + ULARGE_INTEGER length; > >> + ULARGE_INTEGER mtime; > >> + ULARGE_INTEGER atime; > >> + > >> + EINA_SAFETY_ON_NULL_RETURN_VAL(info, -1); > >> + EINA_SAFETY_ON_NULL_RETURN_VAL(st, -1); > >> + > >> + if (!GetFileAttributesEx(info->path, GetFileExInfoStandard, &fad)) > >> + { > >> + if (info->type != EINA_FILE_LNK) > >> + info->type = EINA_FILE_UNKNOWN; > >> + return -1; > >> + } > >> + > >> + length.u.LowPart = fad.nFileSizeLow; > >> + length.u.HighPart = fad.nFileSizeHigh; > >> + atime.u.LowPart = fad.ftLastAccessTime.dwLowDateTime; > >> + atime.u.HighPart = fad.ftLastAccessTime.dwHighDateTime; > >> + mtime.u.LowPart = fad.ftLastWriteTime.dwLowDateTime; > >> + mtime.u.HighPart = fad.ftLastWriteTime.dwHighDateTime; > >> + > >> + st->size = length.QuadPart; > >> + st->atime = atime.QuadPart; > >> + st->mtime = mtime.QuadPart; > >> + return 0; > >> +} > >> > > > > i think that we should memset to 0 st, then fill the fields above > > > > Vincent > > also, maybe stat() is better : > > http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=vs.71%29.aspx > > Vincent > > -- > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Thu, Mar 8, 2012 at 3:22 PM, Vincent Torri wrote: > On Thu, Mar 8, 2012 at 2:54 PM, Enlightenment SVN > wrote: >> Log: >> From: cnook >> Subject: [E-devel] [Patch][Eina] eina_file_win32 - using >> eina_file_statat(); >> >> On windows, Elementary gives build error. cause.. >> The elm_config.c uses eina_file_statat(); but It is not in the >> eina_file_win32.c >> So the attached patch comes. Please keep the patch in the up stream. >> Thanks. >> >> >> >> Author: raster >> Date: 2012-03-08 05:54:01 -0800 (Thu, 08 Mar 2012) >> New Revision: 69058 >> Trac: http://trac.enlightenment.org/e/changeset/69058 >> >> Modified: >> trunk/eina/src/lib/eina_file_win32.c >> >> Modified: trunk/eina/src/lib/eina_file_win32.c >> === >> --- trunk/eina/src/lib/eina_file_win32.c 2012-03-08 13:51:58 UTC (rev >> 69057) >> +++ trunk/eina/src/lib/eina_file_win32.c 2012-03-08 13:54:01 UTC (rev >> 69058) >> @@ -1154,3 +1154,34 @@ >> on_exit: >> eina_lock_release(&file->lock); >> } >> + >> +EAPI int >> +eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat >> *st) >> +{ >> + WIN32_FILE_ATTRIBUTE_DATA fad; >> + ULARGE_INTEGER length; >> + ULARGE_INTEGER mtime; >> + ULARGE_INTEGER atime; >> + >> + EINA_SAFETY_ON_NULL_RETURN_VAL(info, -1); >> + EINA_SAFETY_ON_NULL_RETURN_VAL(st, -1); >> + >> + if (!GetFileAttributesEx(info->path, GetFileExInfoStandard, &fad)) >> + { >> + if (info->type != EINA_FILE_LNK) >> + info->type = EINA_FILE_UNKNOWN; >> + return -1; >> + } >> + >> + length.u.LowPart = fad.nFileSizeLow; >> + length.u.HighPart = fad.nFileSizeHigh; >> + atime.u.LowPart = fad.ftLastAccessTime.dwLowDateTime; >> + atime.u.HighPart = fad.ftLastAccessTime.dwHighDateTime; >> + mtime.u.LowPart = fad.ftLastWriteTime.dwLowDateTime; >> + mtime.u.HighPart = fad.ftLastWriteTime.dwHighDateTime; >> + >> + st->size = length.QuadPart; >> + st->atime = atime.QuadPart; >> + st->mtime = mtime.QuadPart; >> + return 0; >> +} >> > > i think that we should memset to 0 st, then fill the fields above > > Vincent also, maybe stat() is better : http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=vs.71%29.aspx Vincent -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Thu, Mar 8, 2012 at 2:54 PM, Enlightenment SVN wrote: > Log: > From: cnook > Subject: [E-devel] [Patch][Eina] eina_file_win32 - using > eina_file_statat(); > > On windows, Elementary gives build error. cause.. > The elm_config.c uses eina_file_statat(); but It is not in the > eina_file_win32.c > So the attached patch comes. Please keep the patch in the up stream. > Thanks. > > > > Author: raster > Date: 2012-03-08 05:54:01 -0800 (Thu, 08 Mar 2012) > New Revision: 69058 > Trac: http://trac.enlightenment.org/e/changeset/69058 > > Modified: > trunk/eina/src/lib/eina_file_win32.c > > Modified: trunk/eina/src/lib/eina_file_win32.c > === > --- trunk/eina/src/lib/eina_file_win32.c 2012-03-08 13:51:58 UTC (rev > 69057) > +++ trunk/eina/src/lib/eina_file_win32.c 2012-03-08 13:54:01 UTC (rev > 69058) > @@ -1154,3 +1154,34 @@ > on_exit: > eina_lock_release(&file->lock); > } > + > +EAPI int > +eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *st) > +{ > + WIN32_FILE_ATTRIBUTE_DATA fad; > + ULARGE_INTEGER length; > + ULARGE_INTEGER mtime; > + ULARGE_INTEGER atime; > + > + EINA_SAFETY_ON_NULL_RETURN_VAL(info, -1); > + EINA_SAFETY_ON_NULL_RETURN_VAL(st, -1); > + > + if (!GetFileAttributesEx(info->path, GetFileExInfoStandard, &fad)) > + { > + if (info->type != EINA_FILE_LNK) > + info->type = EINA_FILE_UNKNOWN; > + return -1; > + } > + > + length.u.LowPart = fad.nFileSizeLow; > + length.u.HighPart = fad.nFileSizeHigh; > + atime.u.LowPart = fad.ftLastAccessTime.dwLowDateTime; > + atime.u.HighPart = fad.ftLastAccessTime.dwHighDateTime; > + mtime.u.LowPart = fad.ftLastWriteTime.dwLowDateTime; > + mtime.u.HighPart = fad.ftLastWriteTime.dwHighDateTime; > + > + st->size = length.QuadPart; > + st->atime = atime.QuadPart; > + st->mtime = mtime.QuadPart; > + return 0; > +} > i think that we should memset to 0 st, then fill the fields above Vincent -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Wed, 13 Apr 2011 23:57:20 +0200 (CEST) Vincent Torri said: > On Wed, 13 Apr 2011, Enlightenment SVN wrote: > > > Log: > > e.. how about we DONT make every eina using app spew out: > > are you sure tha tit's the correct fix ? yes. it calls eina_file_shutdown() registered in eina_main.c with S(file). and if the shutdown does not return true.. it bitches (in _eina_shutdown_from_desc () as it walks the desc setup array backwards where the shutdown func is registered). and eina_file_shutdown () ALWAYS returned false unconditionally. other shutdown funcs return true. (just look at them). someone decided in great wisdom to make eina_file_shutdown () be different and return false all the time. :) > > > > ERR<23281>:eina eina_main.c:173 _eina_shutdown_from_desc() Problems > > shutting down eina module 'file', ignored. > > > > now there's a bright idea eh? > > > > > > > > Author: raster > > Date: 2011-04-13 14:50:23 -0700 (Wed, 13 Apr 2011) > > New Revision: 58645 > > Trac: http://trac.enlightenment.org/e/changeset/58645 > > > > Modified: > > trunk/eina/src/lib/eina_file.c > > > > Modified: trunk/eina/src/lib/eina_file.c > > === > > --- trunk/eina/src/lib/eina_file.c 2011-04-13 20:48:48 UTC (rev > > 58644) +++ trunk/eina/src/lib/eina_file.c 2011-04-13 21:50:23 UTC > > (rev 58645) @@ -484,7 +484,7 @@ > > > >eina_log_domain_unregister(_eina_file_log_dom); > >_eina_file_log_dom = -1; > > - return EINA_FALSE; > > + return EINA_TRUE; > > } > > > > /** > > > > > > -- > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is a top > > priority.Virtualization can reduce costs, simplify management, and improve > > application availability and disaster protection. Learn more about boosting > > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > ___ > > enlightenment-svn mailing list > > enlightenment-...@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > > > > > -- > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Wed, 13 Apr 2011, Enlightenment SVN wrote: > Log: > e.. how about we DONT make every eina using app spew out: are you sure tha tit's the correct fix ? Vincent > > ERR<23281>:eina eina_main.c:173 _eina_shutdown_from_desc() Problems > shutting down eina module 'file', ignored. > > now there's a bright idea eh? > > > > Author: raster > Date: 2011-04-13 14:50:23 -0700 (Wed, 13 Apr 2011) > New Revision: 58645 > Trac: http://trac.enlightenment.org/e/changeset/58645 > > Modified: > trunk/eina/src/lib/eina_file.c > > Modified: trunk/eina/src/lib/eina_file.c > === > --- trunk/eina/src/lib/eina_file.c2011-04-13 20:48:48 UTC (rev 58644) > +++ trunk/eina/src/lib/eina_file.c2011-04-13 21:50:23 UTC (rev 58645) > @@ -484,7 +484,7 @@ > >eina_log_domain_unregister(_eina_file_log_dom); >_eina_file_log_dom = -1; > - return EINA_FALSE; > + return EINA_TRUE; > } > > /** > > > -- > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > ___ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Sat, 11 Dec 2010 08:19:33 +0100 (CET) Vincent Torri said: actually.. why does it have to get casted TWICE? just casting once to void * should be enough. it will promote to 64bit pointers or do whatever is needed to simply stuff exactly those bits from the magic val into a pointer. > > > On Sat, 11 Dec 2010, Vincent Torri wrote: > > > > > > > On Sat, 11 Dec 2010, Vincent Torri wrote: > > > >> > >> > >> On Fri, 10 Dec 2010, Enlightenment SVN wrote: > >> > >>> Log: > >>> revert part of commit - broke compilation. no uintptr_t in linux > >>> yeaders by default - likely breaks even more. > >> > >> then just include the correct header. uintptr_t is a C99 type. > > > > stdint.h I think > > like that > > Index: eina_magic.c > === > --- eina_magic.c (revision 55485) > +++ eina_magic.c (working copy) > @@ -22,6 +22,9 @@ > > #include > #include > +#ifndef _MSC_VER > +# include > +#endif > > #ifdef HAVE_EVIL > # include > @@ -320,7 +323,7 @@ > _eina_magic_strings_dirty = 0; >} > > - ems = bsearch((void *)(long)magic, _eina_magic_strings, > + ems = bsearch((void *)(uintptr_t)magic, _eina_magic_strings, >_eina_magic_strings_count, sizeof(Eina_Magic_String), >_eina_magic_strings_find_cmp); > if (ems) > > -- > Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, > new data types, scalar functions, improved concurrency, built-in packages, > OCI, SQL*Plus, data movement tools, best practices and more. > http://p.sf.net/sfu/oracle-sfdev2dev > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Tue, 14 Dec 2010 10:45:16 +0200 Tom Hacohen said: > On Tue, 2010-12-14 at 14:35 +0900, Carsten Haitzler wrote: > > > It works for you. Do you see you are giving yourself more work by > > > fixing other's warnings? > > > > not really. patches and work can be rejected on the basis of warnings. we > > just havent done so yet. also forcing people to make things warning free > > encourages people to cast themselves into oblivion as opposed to fix the > > real issue quite often. its better to have warnings than to go hide them > > via casting (when the real solution isnt a cast) > > This is a good point, I prefer seeing the warnings myself than letting > someone silent them in a dumb way. > > > > > And if it's only an architectural issue, the warnings are pretty easy > > > to fix. At least the ones that are worth enabling by default. > > > > and by not using -Werror u dont force anyone to fix any warning. so unless > > you use -Werror your above point is fairly moot. most of e's src had > > warnings in it until a warning hunt WITHOUT any -W options (just standard > > gcc warnings). they never got fixed. reason? people just ignore them. u > > dont get them fixed unle4ss you are dedicated enough to go fix them (and > > then u are dedicated enough to add them to CFLAGS) or... you use -Werror > > and force builds to break. and then see nash's point. > > Unfortunately, this is also true, I don't get this, but I've seen many > developers that ignore warnings (i.e don't even read them). > > Raster: the problem with the current state of warnings in the system, is > that it is hard not adding warnings even when you really try. First of > all, you have no way of knowing which warnings were already there :), > but second of all, because we can't use -Werror (because it will just > break compilation until we fix all of the code), warnings are easy to > miss. > > Btw, I finally remember what we said last time we talked about it. We > said it's a good idea to add to the README/Dev guide/whatever (right > near the coding conventions?) a section that states the recommended > warning flags to be used by developers (i.e warnings of those classes > should not be added by new code). We also talked about recommended > optimization flags that belong to the README of each library. > > We should do them both someday :P on this point - i concur fully. we should have conventions/rules that developers SHOULD follow - like coding standards and naming conventions and formatting and more. a readme/guide/wiki page... no problems with it saying "you REALLY should use -W -Wall -Wextra -Wpants-off..." :) -fvisibility things too so people SEE missing symbol declarations (if your gcc supports it), not to mention probable suggested optimization flags (if you want to be able to debug efl - use -O - not -O2, and -g etc. etc.). if it were me i'd make it simple: for developers we HIGHLY suggest (with a big stick) to do: export CFLAGS="-O -g -march=native -W -Wall -Wextra -fvisibility=hidden" for packagers: export CFLAGS="-O2 -fvisibility=hidden" (only add architecture specific flags like -march=pentium etc. if you want to make a specific generation of the architecture you build for to be a minimum baseline. no one with a cpu "older" than that can use your packages then). of course the packagers may disagree with us and decide otherwise - but at least we did our best and made the suggestion. -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Tue, 2010-12-14 at 14:35 +0900, Carsten Haitzler wrote: > > It works for you. Do you see you are giving yourself more work by > > fixing other's warnings? > > not really. patches and work can be rejected on the basis of warnings. we just > havent done so yet. also forcing people to make things warning free encourages > people to cast themselves into oblivion as opposed to fix the real issue quite > often. its better to have warnings than to go hide them via casting (when the > real solution isnt a cast) This is a good point, I prefer seeing the warnings myself than letting someone silent them in a dumb way. > > > And if it's only an architectural issue, the warnings are pretty easy > > to fix. At least the ones that are worth enabling by default. > > and by not using -Werror u dont force anyone to fix any warning. so unless you > use -Werror your above point is fairly moot. most of e's src had warnings in > it > until a warning hunt WITHOUT any -W options (just standard gcc warnings). they > never got fixed. reason? people just ignore them. u dont get them fixed > unle4ss > you are dedicated enough to go fix them (and then u are dedicated enough to > add > them to CFLAGS) or... you use -Werror and force builds to break. and then see > nash's point. Unfortunately, this is also true, I don't get this, but I've seen many developers that ignore warnings (i.e don't even read them). Raster: the problem with the current state of warnings in the system, is that it is hard not adding warnings even when you really try. First of all, you have no way of knowing which warnings were already there :), but second of all, because we can't use -Werror (because it will just break compilation until we fix all of the code), warnings are easy to miss. Btw, I finally remember what we said last time we talked about it. We said it's a good idea to add to the README/Dev guide/whatever (right near the coding conventions?) a section that states the recommended warning flags to be used by developers (i.e warnings of those classes should not be added by new code). We also talked about recommended optimization flags that belong to the README of each library. We should do them both someday :P -- Tom. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Tue, 14 Dec 2010 01:33:12 -0200 Lucas De Marchi said: > On Mon, Dec 13, 2010 at 11:44 PM, Carsten Haitzler > wrote: > > On Mon, 13 Dec 2010 16:22:35 +0200 Tom Hacohen > > said: > > > >> On Mon, 2010-12-13 at 11:53 -0200, Lucas De Marchi wrote: > >> > Indeed... several projects I work with enable tons of -W when > >> > configured with --enable-maintainer-mode (even -Werror). I don't see a > >> > point against doing this. > >> > >> I suggested that some time ago, and IIRC even raster liked it (I can > >> look for the exact email if that's really needed), so I don't see a > >> reason why not. > >> > >> Maybe you should start a new mail and ask about it specifically. > > > > i'm against them being always turned on by default. if you make > > --enable-warnings or whatever... then whats the point? you can just as > > easily set CFLAGS="-W...". it's less work and already works today. you dont > > have to go touching every configure script. > > It works for you. Do you see you are giving yourself more work by > fixing other's warnings? not really. patches and work can be rejected on the basis of warnings. we just havent done so yet. also forcing people to make things warning free encourages people to cast themselves into oblivion as opposed to fix the real issue quite often. its better to have warnings than to go hide them via casting (when the real solution isnt a cast) > And if it's only an architectural issue, the warnings are pretty easy > to fix. At least the ones that are worth enabling by default. and by not using -Werror u dont force anyone to fix any warning. so unless you use -Werror your above point is fairly moot. most of e's src had warnings in it until a warning hunt WITHOUT any -W options (just standard gcc warnings). they never got fixed. reason? people just ignore them. u dont get them fixed unle4ss you are dedicated enough to go fix them (and then u are dedicated enough to add them to CFLAGS) or... you use -Werror and force builds to break. and then see nash's point. -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Mon, Dec 13, 2010 at 11:44 PM, Carsten Haitzler wrote: > On Mon, 13 Dec 2010 16:22:35 +0200 Tom Hacohen > said: > >> On Mon, 2010-12-13 at 11:53 -0200, Lucas De Marchi wrote: >> > Indeed... several projects I work with enable tons of -W when >> > configured with --enable-maintainer-mode (even -Werror). I don't see a >> > point against doing this. >> >> I suggested that some time ago, and IIRC even raster liked it (I can >> look for the exact email if that's really needed), so I don't see a >> reason why not. >> >> Maybe you should start a new mail and ask about it specifically. > > i'm against them being always turned on by default. if you make > --enable-warnings or whatever... then whats the point? you can just as easily > set CFLAGS="-W...". it's less work and already works today. you dont have to > go > touching every configure script. It works for you. Do you see you are giving yourself more work by fixing other's warnings? And if it's only an architectural issue, the warnings are pretty easy to fix. At least the ones that are worth enabling by default. Lucas De Marchi -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Mon, Dec 13, 2010 at 7:35 PM, Brett Nash wrote: >> > >> > I don't understand why raster is so reluctant in having them. Especially >> > if we enable them only during a development cycle, and not in a release. >> >> Indeed... several projects I work with enable tons of -W when >> configured with --enable-maintainer-mode (even -Werror). I don't see a >> point against doing this. > > There are a few points. First if you are on a different arch to the > maintainers suddenly you can find yourself in warning hell. Similarly > different compiler versions have the same effect[1]. > You are in a warning hell when everyone else do not turn on the warnings. Then there are the "warning hunt seasons", when a bunch of developers tries to turn off all the warnings. So, what's the purpose of having them? give us more work? Actually their purpose is *warning* us of things that might be wrong. This only works when they are turned on and everybody uses them. > -Werror is even worse for this (especially when you are adding a new This forces you to stop what you are doing and fix it. Maybe this would cost you a day of debugging just because you didn't pay attention to warnings. It's pretty much what happens you have several warnings: you just don't care. > feature and you know what/why a warning is but you don't want to fix it Maybe a broken workflow? > for some reason). As a person who always uses a 64bit machine + more > warnings the most, adding a -Werror is a nightmare for me. Maybe -Werror could be left out. But the more we fix and spank who introduced that bug, the more we'll ease our lives later. > > Third reason is it messes with peoples existing warning flags. For > instance I use[2][3]: > -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter > A -Wall at the end resets my other flags, which is really annoying. I'm sure vtorri would be happy to fix this in autotools. > > However the main problem is the simple philosophical one. Don't tell > people how to code. Don't tell them what editor, don't tell them what > compiler, don't tell them what architecture to use, don't tell them what > C flags. Nah... I don't see any philosophical thing here. It's just a set of pet rules we all have. Mine are: Don't cast void pointers to int. Don't use gotos when unnecessary. Warnings you add, are warnings you fix. Don't submit code without testing. I agree to most of the rules from kernel, connman and webkit, too. And some others do's and don'ts... > Having said that: People with no CFLAGS should probably be given a > default set, and suggestions of CFLAGS to use is a good idea. After having to fix *bugs* because people do not enable the warnings by default, I think it's advisable to add the --enable-maintainer-mode flag. Whenever someone tries to hack something and submit patches, he/she will need to pass this flag. I'm not the one that would like to fix the warnings *he/she* introduced (unless it's because of the architecture... then I would spank he/she first). > > [1] I was the first in my company to upgrade to gcc 4 at the time with > 'mandatory' CFLAGS, and found myself in hundreds of warnings when the > previous version was warning free. I was the first to upgrade to gcc 5. I remember I found a bug in connman because of this. And I didn't fix it, I just pointed the warning to the right person. > [2] I'll probably be adding void arithmetic to this soon. > > [3] I used to have more. I turned some off due to too many warnings > elsewhere. You've just made my point that having your own private CFLAGS does not work. Lucas De Marchi -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Tue, 14 Dec 2010 08:35:49 +1100 Brett Nash said: > > > > > > I don't understand why raster is so reluctant in having them. Especially > > > if we enable them only during a development cycle, and not in a release. > > > > Indeed... several projects I work with enable tons of -W when > > configured with --enable-maintainer-mode (even -Werror). I don't see a > > point against doing this. > > There are a few points. First if you are on a different arch to the > maintainers suddenly you can find yourself in warning hell. Similarly > different compiler versions have the same effect[1]. > > -Werror is even worse for this (especially when you are adding a new > feature and you know what/why a warning is but you don't want to fix it > for some reason). As a person who always uses a 64bit machine + more > warnings the most, adding a -Werror is a nightmare for me. > > Third reason is it messes with peoples existing warning flags. For > instance I use[2][3]: > -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter > A -Wall at the end resets my other flags, which is really annoying. > > However the main problem is the simple philosophical one. Don't tell > people how to code. Don't tell them what editor, don't tell them what > compiler, don't tell them what architecture to use, don't tell them what > C flags. > > Having said that: People with no CFLAGS should probably be given a > default set, and suggestions of CFLAGS to use is a good idea. agreed. if you are an efl developer - you should PROBABLY have a set of warning flags on by default during development (unless as you say - you are doing something new and are not interested in fixing every little thing now, just trying to bootstrap it and get it up at all). i don't understand when everyone is obsessed by making it either default OR a --enable-warnings option when it is simpler and easier to just set CFLAGS. if you have to tell someone of a configure option and how to use it - you also have to spend the same effort to tell them of how to set CFLAGS - and they make the the same effort (actually less as they just set their cflags in 1 place for all their builds, but a --enable option has to be passed every time they autogen/configure so cflags is in fact a much better solution). the only thing that makes sense is having them always on in all projects by default. but then as brett says - it messes with existing warning flags in CFLAGS which is where they should go etc. etc. etc. > Regards, > nash > > > > [1] I was the first in my company to upgrade to gcc 4 at the time with > 'mandatory' CFLAGS, and found myself in hundreds of warnings when the > previous version was warning free. > > [2] I'll probably be adding void arithmetic to this soon. > > [3] I used to have more. I turned some off due to too many warnings > elsewhere. > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Mon, 13 Dec 2010 16:22:35 +0200 Tom Hacohen said: > On Mon, 2010-12-13 at 11:53 -0200, Lucas De Marchi wrote: > > Indeed... several projects I work with enable tons of -W when > > configured with --enable-maintainer-mode (even -Werror). I don't see a > > point against doing this. > > I suggested that some time ago, and IIRC even raster liked it (I can > look for the exact email if that's really needed), so I don't see a > reason why not. > > Maybe you should start a new mail and ask about it specifically. i'm against them being always turned on by default. if you make --enable-warnings or whatever... then whats the point? you can just as easily set CFLAGS="-W...". it's less work and already works today. you dont have to go touching every configure script. -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
> > > > I don't understand why raster is so reluctant in having them. Especially > > if we enable them only during a development cycle, and not in a release. > > Indeed... several projects I work with enable tons of -W when > configured with --enable-maintainer-mode (even -Werror). I don't see a > point against doing this. There are a few points. First if you are on a different arch to the maintainers suddenly you can find yourself in warning hell. Similarly different compiler versions have the same effect[1]. -Werror is even worse for this (especially when you are adding a new feature and you know what/why a warning is but you don't want to fix it for some reason). As a person who always uses a 64bit machine + more warnings the most, adding a -Werror is a nightmare for me. Third reason is it messes with peoples existing warning flags. For instance I use[2][3]: -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter A -Wall at the end resets my other flags, which is really annoying. However the main problem is the simple philosophical one. Don't tell people how to code. Don't tell them what editor, don't tell them what compiler, don't tell them what architecture to use, don't tell them what C flags. Having said that: People with no CFLAGS should probably be given a default set, and suggestions of CFLAGS to use is a good idea. Regards, nash [1] I was the first in my company to upgrade to gcc 4 at the time with 'mandatory' CFLAGS, and found myself in hundreds of warnings when the previous version was warning free. [2] I'll probably be adding void arithmetic to this soon. [3] I used to have more. I turned some off due to too many warnings elsewhere. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Mon, 2010-12-13 at 11:53 -0200, Lucas De Marchi wrote: > Indeed... several projects I work with enable tons of -W when > configured with --enable-maintainer-mode (even -Werror). I don't see a > point against doing this. I suggested that some time ago, and IIRC even raster liked it (I can look for the exact email if that's really needed), so I don't see a reason why not. Maybe you should start a new mail and ask about it specifically. -- Tom. -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Mon, Dec 13, 2010 at 10:51 AM, Vincent Torri wrote: > > > On Mon, 13 Dec 2010, Brett Nash wrote: > >> >>> sure, as i mentioned them when i compiled with suncc. Otherwise, with gcc, >>> from >>> >>> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options >>> >>> "-Wpointer-arith >>> Warn about anything that depends on the .size of. a function type or >>> of void. GNU C assigns these types a size of 1, for convenience in >>> calculations with void * pointers and pointers to functions. In C++, warn >>> also when an arithmetic operation involves NULL. This warning is also >>> enabled by -pedantic." >>> >>> so not enabled with one of your flags. >> >> Now that is strange. >> >> I swear that used to part of -Wextra, although the documentation >> indicates I am mistaken (a couple of 4's and 3's checked there). >> >> I personally despise that gcc extension. > > that could be a good reason to add flags in configure.ac. If gcc keeps > changing the flags enabled by -Wall, -W, -Wextra and others in the > different version of gcc, adding them directly in the autotools will be > safer. > > I don't understand why raster is so reluctant in having them. Especially > if we enable them only during a development cycle, and not in a release. Indeed... several projects I work with enable tons of -W when configured with --enable-maintainer-mode (even -Werror). I don't see a point against doing this. Lucas De Marchi -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Mon, 13 Dec 2010, Brett Nash wrote: > >> sure, as i mentioned them when i compiled with suncc. Otherwise, with gcc, >> from >> >> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options >> >> "-Wpointer-arith >> Warn about anything that depends on the .size of. a function type or >> of void. GNU C assigns these types a size of 1, for convenience in >> calculations with void * pointers and pointers to functions. In C++, warn >> also when an arithmetic operation involves NULL. This warning is also >> enabled by -pedantic." >> >> so not enabled with one of your flags. > > Now that is strange. > > I swear that used to part of -Wextra, although the documentation > indicates I am mistaken (a couple of 4's and 3's checked there). > > I personally despise that gcc extension. that could be a good reason to add flags in configure.ac. If gcc keeps changing the flags enabled by -Wall, -W, -Wextra and others in the different version of gcc, adding them directly in the autotools will be safer. I don't understand why raster is so reluctant in having them. Especially if we enable them only during a development cycle, and not in a release. Vincent -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
> sure, as i mentioned them when i compiled with suncc. Otherwise, with gcc, > from > > http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options > > "-Wpointer-arith > Warn about anything that depends on the .size of. a function type or > of void. GNU C assigns these types a size of 1, for convenience in > calculations with void * pointers and pointers to functions. In C++, warn > also when an arithmetic operation involves NULL. This warning is also > enabled by -pedantic." > > so not enabled with one of your flags. Now that is strange. I swear that used to part of -Wextra, although the documentation indicates I am mistaken (a couple of 4's and 3's checked there). I personally despise that gcc extension. Regards, nash -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Mon, 13 Dec 2010, Carsten Haitzler (The Rasterman) wrote: > On Sat, 11 Dec 2010 07:52:44 +0100 (CET) Vincent Torri > said: > >> >> >> On Fri, 10 Dec 2010, Enlightenment SVN wrote: >> >>> Log: >>> fix void ptr math. odd that no warnings happened before with all my >>> warning flags on. >> >> just use -Wpointer-arith > > it should have been on. i use -W -Wall -Wextra. odd. i have SEEN these > warnings > before too. sure, as i mentioned them when i compiled with suncc. Otherwise, with gcc, from http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options "-Wpointer-arith Warn about anything that depends on the .size of. a function type or of void. GNU C assigns these types a size of 1, for convenience in calculations with void * pointers and pointers to functions. In C++, warn also when an arithmetic operation involves NULL. This warning is also enabled by -pedantic." so not enabled with one of your flags. Vincent > >> what about ading in all the EFL: >> >> m4_ifdef([v_rev], >> [ >> EFL_COMPILER_FLAG([-Wpointer-arith]) >> ]) >> >> to be sure we (that is not only you) don't miss them ? >> >> Vincent >> >>> >>> >>> >>> Author: raster >>> Date: 2010-12-10 19:57:05 -0800 (Fri, 10 Dec 2010) >>> New Revision: 55484 >>> Trac: http://trac.enlightenment.org/e/changeset/55484 >>> >>> Modified: >>> trunk/eina/src/lib/eina_strbuf_common.c >>> >>> Modified: trunk/eina/src/lib/eina_strbuf_common.c >>> === >>> --- trunk/eina/src/lib/eina_strbuf_common.c 2010-12-11 03:44:33 UTC >>> (rev 55483) +++ trunk/eina/src/lib/eina_strbuf_common.c 2010-12-11 >>> 03:57:05 UTC (rev 55484) @@ -195,14 +195,15 @@ >>> return EINA_FALSE; >>> >>>/* move the existing text */ >>> - memmove(buf->buf + ((len + pos) * csize), buf->buf + (pos * csize), >>> + memmove(((unsigned char *)(buf->buf)) + ((len + pos) * csize), >>> + ((unsigned char *)(buf->buf)) + (pos * csize), >>>(buf->len - pos) * csize); >>> >>>/* and now insert the given string */ >>>memcpy(buf->buf + (pos * csize), str, len * csize); >>> >>>buf->len += len; >>> - memset(buf->buf + (buf->len * csize), 0, csize); >>> + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >>>return EINA_TRUE; >>> } >>> >>> @@ -305,7 +306,8 @@ >>>if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) >>> return EINA_FALSE; >>> >>> - memcpy(buf->buf + (buf->len * csize), str, (len + 1) * csize); >>> + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, >>> + (len + 1) * csize); >>>buf->len += len; >>>return EINA_TRUE; >>> } >>> @@ -346,9 +348,10 @@ >>>if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) >>> return EINA_FALSE; >>> >>> - memcpy(buf->buf + (buf->len * csize), str, len * csize); >>> + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, >>> + len * csize); >>>buf->len += len; >>> - memset(buf->buf + (buf->len * csize), 0, csize); >>> + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >>>return EINA_TRUE; >>> } >>> >>> @@ -382,9 +385,10 @@ >>>if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + >>> length))) return EINA_FALSE; >>> >>> - memcpy(buf->buf + (buf->len * csize), str, length * csize); >>> + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, >>> + length * csize); >>>buf->len += length; >>> - memset(buf->buf + (buf->len * csize), 0, csize); >>> + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >>>return EINA_TRUE; >>> } >>> >>> @@ -507,8 +511,8 @@ >>>if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + 1))) >>> return EINA_FALSE; >>> >>> - memcpy(buf->buf + ((buf->len)++ *csize), c, csize); >>> - memset(buf->buf + (buf->len * csize), 0, csize); >>> + memcpy(((unsigned char *)(buf->buf)) + ((buf->len)++ *csize), c, csize); >>> + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >>>return EINA_TRUE; >>> } >>> >>> @@ -574,8 +578,8 @@ >>> } >>> >>>tail_len = buf->len - end + 1; /* includes '\0' */ >>> - memmove(buf->buf + (start * csize), >>> - buf->buf + (end * csize), >>> + memmove(((unsigned char *)(buf->buf)) + (start * csize), >>> + ((unsigned char *)(buf->buf)) + (end * csize), >>>tail_len * csize); >>>buf->len -= remove_len; >>>return _eina_strbuf_common_resize(csize, buf, buf->len); >>> @@ -747,14 +751,15 @@ >>> >>> } >>> >>> -memmove(buf->buf + pos + len2, buf->buf + pos + len1, >>> +memmove(((unsigned char *)(buf->buf)) + pos + len2, >>> +((unsigned char *)(buf->buf)) + pos + len1, >>> buf->len - pos - len1); >>> } >>> >>>/* and now insert the given string */ >>> - memcpy
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Sat, 11 Dec 2010 07:52:44 +0100 (CET) Vincent Torri said: > > > On Fri, 10 Dec 2010, Enlightenment SVN wrote: > > > Log: > > fix void ptr math. odd that no warnings happened before with all my > > warning flags on. > > just use -Wpointer-arith it should have been on. i use -W -Wall -Wextra. odd. i have SEEN these warnings before too. > what about ading in all the EFL: > > m4_ifdef([v_rev], > [ > EFL_COMPILER_FLAG([-Wpointer-arith]) > ]) > > to be sure we (that is not only you) don't miss them ? > > Vincent > > > > > > > > > Author: raster > > Date: 2010-12-10 19:57:05 -0800 (Fri, 10 Dec 2010) > > New Revision: 55484 > > Trac: http://trac.enlightenment.org/e/changeset/55484 > > > > Modified: > > trunk/eina/src/lib/eina_strbuf_common.c > > > > Modified: trunk/eina/src/lib/eina_strbuf_common.c > > === > > --- trunk/eina/src/lib/eina_strbuf_common.c 2010-12-11 03:44:33 UTC > > (rev 55483) +++ trunk/eina/src/lib/eina_strbuf_common.c 2010-12-11 > > 03:57:05 UTC (rev 55484) @@ -195,14 +195,15 @@ > > return EINA_FALSE; > > > >/* move the existing text */ > > - memmove(buf->buf + ((len + pos) * csize), buf->buf + (pos * csize), > > + memmove(((unsigned char *)(buf->buf)) + ((len + pos) * csize), > > + ((unsigned char *)(buf->buf)) + (pos * csize), > >(buf->len - pos) * csize); > > > >/* and now insert the given string */ > >memcpy(buf->buf + (pos * csize), str, len * csize); > > > >buf->len += len; > > - memset(buf->buf + (buf->len * csize), 0, csize); > > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); > >return EINA_TRUE; > > } > > > > @@ -305,7 +306,8 @@ > >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) > > return EINA_FALSE; > > > > - memcpy(buf->buf + (buf->len * csize), str, (len + 1) * csize); > > + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, > > + (len + 1) * csize); > >buf->len += len; > >return EINA_TRUE; > > } > > @@ -346,9 +348,10 @@ > >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) > > return EINA_FALSE; > > > > - memcpy(buf->buf + (buf->len * csize), str, len * csize); > > + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, > > + len * csize); > >buf->len += len; > > - memset(buf->buf + (buf->len * csize), 0, csize); > > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); > >return EINA_TRUE; > > } > > > > @@ -382,9 +385,10 @@ > >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + > > length))) return EINA_FALSE; > > > > - memcpy(buf->buf + (buf->len * csize), str, length * csize); > > + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, > > + length * csize); > >buf->len += length; > > - memset(buf->buf + (buf->len * csize), 0, csize); > > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); > >return EINA_TRUE; > > } > > > > @@ -507,8 +511,8 @@ > >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + 1))) > > return EINA_FALSE; > > > > - memcpy(buf->buf + ((buf->len)++ *csize), c, csize); > > - memset(buf->buf + (buf->len * csize), 0, csize); > > + memcpy(((unsigned char *)(buf->buf)) + ((buf->len)++ *csize), c, csize); > > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); > >return EINA_TRUE; > > } > > > > @@ -574,8 +578,8 @@ > > } > > > >tail_len = buf->len - end + 1; /* includes '\0' */ > > - memmove(buf->buf + (start * csize), > > - buf->buf + (end * csize), > > + memmove(((unsigned char *)(buf->buf)) + (start * csize), > > + ((unsigned char *)(buf->buf)) + (end * csize), > >tail_len * csize); > >buf->len -= remove_len; > >return _eina_strbuf_common_resize(csize, buf, buf->len); > > @@ -747,14 +751,15 @@ > > > > } > > > > -memmove(buf->buf + pos + len2, buf->buf + pos + len1, > > +memmove(((unsigned char *)(buf->buf)) + pos + len2, > > +((unsigned char *)(buf->buf)) + pos + len1, > > buf->len - pos - len1); > > } > > > >/* and now insert the given string */ > > - memcpy(buf->buf + pos, with, len2); > > + memcpy(((unsigned char *)(buf->buf)) + pos, with, len2); > >buf->len += len2 - len1; > > - memset((char *)buf->buf + buf->len, 0, 1); > > + memset(((unsigned char *)(buf->buf)) + buf->len, 0, 1); > > > >return EINA_TRUE; > > } > > @@ -831,9 +836,11 @@ > > } > > > > /* copy the untouched text */ > > - memcpy(buf->buf + start, tmp_buf + start_tmp, pos - start); > > + memcpy(((unsigned char *)(buf->buf)) + start, > > +tmp_buf + start_tmp, pos - start); > > /* copy the new string */ > > -
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Sat, 11 Dec 2010, Vincent Torri wrote: > > > On Sat, 11 Dec 2010, Vincent Torri wrote: > >> >> >> On Fri, 10 Dec 2010, Enlightenment SVN wrote: >> >>> Log: >>> revert part of commit - broke compilation. no uintptr_t in linux >>> yeaders by default - likely breaks even more. >> >> then just include the correct header. uintptr_t is a C99 type. > > stdint.h I think like that Index: eina_magic.c === --- eina_magic.c(revision 55485) +++ eina_magic.c(working copy) @@ -22,6 +22,9 @@ #include #include +#ifndef _MSC_VER +# include +#endif #ifdef HAVE_EVIL # include @@ -320,7 +323,7 @@ _eina_magic_strings_dirty = 0; } - ems = bsearch((void *)(long)magic, _eina_magic_strings, + ems = bsearch((void *)(uintptr_t)magic, _eina_magic_strings, _eina_magic_strings_count, sizeof(Eina_Magic_String), _eina_magic_strings_find_cmp); if (ems) -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Sat, 11 Dec 2010, Vincent Torri wrote: > > > On Fri, 10 Dec 2010, Enlightenment SVN wrote: > >> Log: >> revert part of commit - broke compilation. no uintptr_t in linux >> yeaders by default - likely breaks even more. > > then just include the correct header. uintptr_t is a C99 type. stdint.h I think > > Vincent > >> >> >> >> Author: raster >> Date: 2010-12-10 19:44:33 -0800 (Fri, 10 Dec 2010) >> New Revision: 55483 >> Trac: http://trac.enlightenment.org/e/changeset/55483 >> >> Modified: >> trunk/eina/src/lib/eina_magic.c >> >> Modified: trunk/eina/src/lib/eina_magic.c >> === >> --- trunk/eina/src/lib/eina_magic.c 2010-12-11 03:22:54 UTC (rev 55482) >> +++ trunk/eina/src/lib/eina_magic.c 2010-12-11 03:44:33 UTC (rev 55483) >> @@ -320,7 +320,7 @@ >> _eina_magic_strings_dirty = 0; >> } >> >> - ems = bsearch((void *)(uintptr_t)magic, _eina_magic_strings, >> + ems = bsearch((void *)(long)magic, _eina_magic_strings, >> _eina_magic_strings_count, sizeof(Eina_Magic_String), >> _eina_magic_strings_find_cmp); >>if (ems) >> >> >> -- >> Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, >> new data types, scalar functions, improved concurrency, built-in packages, >> OCI, SQL*Plus, data movement tools, best practices and more. >> http://p.sf.net/sfu/oracle-sfdev2dev >> ___ >> enlightenment-svn mailing list >> enlightenment-...@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn >> >> > > -- > Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, > new data types, scalar functions, improved concurrency, built-in packages, > OCI, SQL*Plus, data movement tools, best practices and more. > http://p.sf.net/sfu/oracle-sfdev2dev > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Fri, 10 Dec 2010, Enlightenment SVN wrote: > Log: > fix void ptr math. odd that no warnings happened before with all my > warning flags on. just use -Wpointer-arith what about ading in all the EFL: m4_ifdef([v_rev], [ EFL_COMPILER_FLAG([-Wpointer-arith]) ]) to be sure we (that is not only you) don't miss them ? Vincent > > > > Author: raster > Date: 2010-12-10 19:57:05 -0800 (Fri, 10 Dec 2010) > New Revision: 55484 > Trac: http://trac.enlightenment.org/e/changeset/55484 > > Modified: > trunk/eina/src/lib/eina_strbuf_common.c > > Modified: trunk/eina/src/lib/eina_strbuf_common.c > === > --- trunk/eina/src/lib/eina_strbuf_common.c 2010-12-11 03:44:33 UTC (rev > 55483) > +++ trunk/eina/src/lib/eina_strbuf_common.c 2010-12-11 03:57:05 UTC (rev > 55484) > @@ -195,14 +195,15 @@ > return EINA_FALSE; > >/* move the existing text */ > - memmove(buf->buf + ((len + pos) * csize), buf->buf + (pos * csize), > + memmove(((unsigned char *)(buf->buf)) + ((len + pos) * csize), > + ((unsigned char *)(buf->buf)) + (pos * csize), >(buf->len - pos) * csize); > >/* and now insert the given string */ >memcpy(buf->buf + (pos * csize), str, len * csize); > >buf->len += len; > - memset(buf->buf + (buf->len * csize), 0, csize); > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >return EINA_TRUE; > } > > @@ -305,7 +306,8 @@ >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) > return EINA_FALSE; > > - memcpy(buf->buf + (buf->len * csize), str, (len + 1) * csize); > + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, > + (len + 1) * csize); >buf->len += len; >return EINA_TRUE; > } > @@ -346,9 +348,10 @@ >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) > return EINA_FALSE; > > - memcpy(buf->buf + (buf->len * csize), str, len * csize); > + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, > + len * csize); >buf->len += len; > - memset(buf->buf + (buf->len * csize), 0, csize); > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >return EINA_TRUE; > } > > @@ -382,9 +385,10 @@ >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + > length))) > return EINA_FALSE; > > - memcpy(buf->buf + (buf->len * csize), str, length * csize); > + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, > + length * csize); >buf->len += length; > - memset(buf->buf + (buf->len * csize), 0, csize); > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >return EINA_TRUE; > } > > @@ -507,8 +511,8 @@ >if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + 1))) > return EINA_FALSE; > > - memcpy(buf->buf + ((buf->len)++ *csize), c, csize); > - memset(buf->buf + (buf->len * csize), 0, csize); > + memcpy(((unsigned char *)(buf->buf)) + ((buf->len)++ *csize), c, csize); > + memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); >return EINA_TRUE; > } > > @@ -574,8 +578,8 @@ > } > >tail_len = buf->len - end + 1; /* includes '\0' */ > - memmove(buf->buf + (start * csize), > - buf->buf + (end * csize), > + memmove(((unsigned char *)(buf->buf)) + (start * csize), > + ((unsigned char *)(buf->buf)) + (end * csize), >tail_len * csize); >buf->len -= remove_len; >return _eina_strbuf_common_resize(csize, buf, buf->len); > @@ -747,14 +751,15 @@ > > } > > -memmove(buf->buf + pos + len2, buf->buf + pos + len1, > +memmove(((unsigned char *)(buf->buf)) + pos + len2, > +((unsigned char *)(buf->buf)) + pos + len1, > buf->len - pos - len1); > } > >/* and now insert the given string */ > - memcpy(buf->buf + pos, with, len2); > + memcpy(((unsigned char *)(buf->buf)) + pos, with, len2); >buf->len += len2 - len1; > - memset((char *)buf->buf + buf->len, 0, 1); > + memset(((unsigned char *)(buf->buf)) + buf->len, 0, 1); > >return EINA_TRUE; > } > @@ -831,9 +836,11 @@ > } > > /* copy the untouched text */ > - memcpy(buf->buf + start, tmp_buf + start_tmp, pos - start); > + memcpy(((unsigned char *)(buf->buf)) + start, > +tmp_buf + start_tmp, pos - start); > /* copy the new string */ > - memcpy(buf->buf + pos, with,len2); > + memcpy(((unsigned char *)(buf->buf)) + pos, > +with,len2); > > /* calculate the next positions */ > start_tmp = pos_tmp + len1; > @@ -846,9 +853,10 @@ > pos = start + pos_tmp - start_tmp; > } >/* and now copy the rest of the text */ > - memcpy(buf->buf + start, tmp_bu
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Fri, 10 Dec 2010, Enlightenment SVN wrote: > Log: > revert part of commit - broke compilation. no uintptr_t in linux > yeaders by default - likely breaks even more. then just include the correct header. uintptr_t is a C99 type. Vincent > > > > Author: raster > Date: 2010-12-10 19:44:33 -0800 (Fri, 10 Dec 2010) > New Revision: 55483 > Trac: http://trac.enlightenment.org/e/changeset/55483 > > Modified: > trunk/eina/src/lib/eina_magic.c > > Modified: trunk/eina/src/lib/eina_magic.c > === > --- trunk/eina/src/lib/eina_magic.c 2010-12-11 03:22:54 UTC (rev 55482) > +++ trunk/eina/src/lib/eina_magic.c 2010-12-11 03:44:33 UTC (rev 55483) > @@ -320,7 +320,7 @@ > _eina_magic_strings_dirty = 0; > } > > - ems = bsearch((void *)(uintptr_t)magic, _eina_magic_strings, > + ems = bsearch((void *)(long)magic, _eina_magic_strings, > _eina_magic_strings_count, sizeof(Eina_Magic_String), > _eina_magic_strings_find_cmp); >if (ems) > > > -- > Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, > new data types, scalar functions, improved concurrency, built-in packages, > OCI, SQL*Plus, data movement tools, best practices and more. > http://p.sf.net/sfu/oracle-sfdev2dev > ___ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > -- Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Sun, 22 Aug 2010 06:11:40 +0200 (CEST) Vincent Torri said: > > Modified: trunk/eina/src/lib/eina_log.c > > === > > --- trunk/eina/src/lib/eina_log.c 2010-08-22 01:15:18 UTC (rev 51505) > > +++ trunk/eina/src/lib/eina_log.c 2010-08-22 01:15:47 UTC (rev 51506) > > @@ -354,10 +354,11 @@ > >do { \ > > if (!IS_MAIN(pthread_self())) {\ > > fprintf > > (stderr, \ > > - "ERR: not main thread! current=%lu, main=%lu > > \n",\ > > - pthread_self(), > > _main_thread); \ > > - return > > __VA_ARGS__; \ > > - } > > \ > > + "ERR: not main thread! current=%lu, main=%lu\n", \ > > + (unsigned long)pthread_self(), > > \ > > +(unsigned long)_main_thread); \ > > + return __VA_ARGS__;\ > > + } \ > > } while (0) > > formatting in the above code i already fixed formatting ... but just at end - not start. fixed now. formatting was kind of iffy anyway already > > # ifdef EFL_HAVE_POSIX_THREADS_SPINLOCK > > @@ -368,7 +369,7 @@ > > do > > { \ if (0) > > { \ fprintf > > (stderr, "+++LOG LOG_LOCKED! [%s, %lu]\n", \ > > -__FUNCTION__, pthread_self > > ()); } \ > > +__FUNCTION__, (unsigned long)pthread_self > > ()); } \ > > what is the interest of having code with "if (0)" ? (same below) beats me - was there before. a disable inside the define > Vincent > > >if (EINA_UNLIKELY(_threads_enabled)) > > { \ pthread_spin_lock > > (&_log_lock); } \ } while (0) > > @@ -380,7 +381,7 @@ > >if (0) > > { \ fprintf > > (stderr, \ "---LOG > > LOG_UNLOCKED! [%s, %lu]\n", \ > > -__FUNCTION__, pthread_self > > ()); } \ > > +__FUNCTION__, (unsigned long)pthread_self > > ()); } \ } while (0) > > # define INIT() pthread_spin_init(&_log_lock, PTHREAD_PROCESS_PRIVATE) > > # define SHUTDOWN() pthread_spin_destroy(&_log_lock) > > @@ -777,7 +778,7 @@ > >if (IS_OTHER(cur)) > > { > > fprintf(fp, "%s:%s[T:%lu] %s:%d %s() ", > > -name, d->domain_str, cur, file, line, fnc); > > +name, d->domain_str, (unsigned long)cur, file, line, fnc); > > return; > > } > > > > @@ -799,7 +800,7 @@ > >if (IS_OTHER(cur)) > > { > > fprintf(fp, "%s:%s[T:%lu] %s() ", > > -name, d->domain_str, cur, fnc); > > +name, d->domain_str, (unsigned long)cur, fnc); > > return; > > } > > > > @@ -821,7 +822,7 @@ > >if (IS_OTHER(cur)) > > { > > fprintf(fp, "%s:%s[T:%lu] %s:%d ", > > -name, d->domain_str, cur, file, line); > > +name, d->domain_str, (unsigned long)cur, file, line); > > return; > > } > > > > @@ -883,7 +884,8 @@ > > fprintf(fp, "%s%s" EINA_COLOR_RESET ":%s[T:" > > EINA_COLOR_ORANGE "%lu" EINA_COLOR_RESET "] %s:%d " > > EINA_COLOR_HIGH "%s()" EINA_COLOR_RESET " ", > > -color, name, d->domain_str, cur, file, line, fnc); > > +color, name, d->domain_str, (unsigned long)cur, file, > > + line, fnc); > > # endif > > return; > > } > > @@ -951,7 +953,7 @@ > > fprintf(fp, "%s%s" EINA_COLOR_RESET ":%s[T:" > > EINA_COLOR_ORANGE "%lu" EINA_COLOR_RESET "] " > > EINA_COLOR_HIGH "%s()" EINA_COLOR_RESET " ", > > -color, name, d->domain_str, cur, fnc); > > +color, name, d->domain_str, (unsigned long)cur, fnc); > > # endif > > return; > > } > > @@ -1013,7 +1015,7 @@ > > # else > > fprintf(fp, "%s%s" EINA_COLOR_RESET ":%s[T:" > > EINA_COLOR_ORANGE "%lu" EINA_COLOR_RESET "] %s:%d ", > > -color, name, d->domain_str, cur, file, line); > > +color, name, d->domain_str, (unsigned long)cur, file, > > line); > > # endif > > return; > > } > > @@ -2246,7 +2248,8 @@ > > cur = SELF(); > > if (IS_OTHER(cur)) > > { >
Re: [E-devel] E SVN: raster trunk/eina/src/lib
> Modified: trunk/eina/src/lib/eina_log.c > === > --- trunk/eina/src/lib/eina_log.c 2010-08-22 01:15:18 UTC (rev 51505) > +++ trunk/eina/src/lib/eina_log.c 2010-08-22 01:15:47 UTC (rev 51506) > @@ -354,10 +354,11 @@ >do { \ > if (!IS_MAIN(pthread_self())) {\ > fprintf(stderr, >\ > - "ERR: not main thread! current=%lu, main=%lu\n", > \ > - pthread_self(), _main_thread); > \ > - return __VA_ARGS__; > \ > - } > \ > + "ERR: not main thread! current=%lu, main=%lu\n", \ > + (unsigned long)pthread_self(), \ > + (unsigned long)_main_thread); \ > + return __VA_ARGS__;\ > + } \ > } while (0) formatting in the above code > # ifdef EFL_HAVE_POSIX_THREADS_SPINLOCK > @@ -368,7 +369,7 @@ > do { \ >if (0) { > \ > fprintf(stderr, "+++LOG LOG_LOCKED! [%s, %lu]\n", >\ > -__FUNCTION__, pthread_self()); } > \ > +__FUNCTION__, (unsigned long)pthread_self()); } > \ what is the interest of having code with "if (0)" ? (same below) Vincent >if (EINA_UNLIKELY(_threads_enabled)) { > \ > pthread_spin_lock(&_log_lock); } > \ > } while (0) > @@ -380,7 +381,7 @@ >if (0) { > \ > fprintf(stderr, > \ > "---LOG LOG_UNLOCKED! [%s, %lu]\n", >\ > -__FUNCTION__, pthread_self()); } > \ > +__FUNCTION__, (unsigned long)pthread_self()); } > \ > } while (0) > # define INIT() pthread_spin_init(&_log_lock, PTHREAD_PROCESS_PRIVATE) > # define SHUTDOWN() pthread_spin_destroy(&_log_lock) > @@ -777,7 +778,7 @@ >if (IS_OTHER(cur)) > { > fprintf(fp, "%s:%s[T:%lu] %s:%d %s() ", > -name, d->domain_str, cur, file, line, fnc); > +name, d->domain_str, (unsigned long)cur, file, line, fnc); > return; > } > > @@ -799,7 +800,7 @@ >if (IS_OTHER(cur)) > { > fprintf(fp, "%s:%s[T:%lu] %s() ", > -name, d->domain_str, cur, fnc); > +name, d->domain_str, (unsigned long)cur, fnc); > return; > } > > @@ -821,7 +822,7 @@ >if (IS_OTHER(cur)) > { > fprintf(fp, "%s:%s[T:%lu] %s:%d ", > -name, d->domain_str, cur, file, line); > +name, d->domain_str, (unsigned long)cur, file, line); > return; > } > > @@ -883,7 +884,8 @@ > fprintf(fp, "%s%s" EINA_COLOR_RESET ":%s[T:" > EINA_COLOR_ORANGE "%lu" EINA_COLOR_RESET "] %s:%d " > EINA_COLOR_HIGH "%s()" EINA_COLOR_RESET " ", > -color, name, d->domain_str, cur, file, line, fnc); > +color, name, d->domain_str, (unsigned long)cur, file, > + line, fnc); > # endif > return; > } > @@ -951,7 +953,7 @@ > fprintf(fp, "%s%s" EINA_COLOR_RESET ":%s[T:" > EINA_COLOR_ORANGE "%lu" EINA_COLOR_RESET "] " > EINA_COLOR_HIGH "%s()" EINA_COLOR_RESET " ", > -color, name, d->domain_str, cur, fnc); > +color, name, d->domain_str, (unsigned long)cur, fnc); > # endif > return; > } > @@ -1013,7 +1015,7 @@ > # else > fprintf(fp, "%s%s" EINA_COLOR_RESET ":%s[T:" > EINA_COLOR_ORANGE "%lu" EINA_COLOR_RESET "] %s:%d ", > -color, name, d->domain_str, cur, file, line); > +color, name, d->domain_str, (unsigned long)cur, file, line); > # endif > return; > } > @@ -2246,7 +2248,8 @@ > cur = SELF(); > if (IS_OTHER(cur)) > { > - fprintf(f, "%s[T:%lu] %s:%d %s() ", d->name, cur, file, line, > fnc); > + fprintf(f, "%s[T:%lu] %s:%d %s() ", d->name, (unsigned long)cur, > + file, line, fnc); > goto end; > } > } > > >
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Thu, 13 Aug 2009 07:18:28 +0200 (CEST) Vincent Torri said: well returning the time with a 0 date (invalid) is better than nothing, but it won't fail - the format is a fixed format always the same according to the docs. > On Wed, 12 Aug 2009, Enlightenment SVN wrote: > > > +fields = sscanf(_eina_hamster_time, "%02i:%02i:%02i", &hrs, &min, > > &sec); > > +if (fields == 3) > > + { > > + _eina_hamsters = (hrs * 60) + min; > > + fields = sscanf(_eina_hamster_date, "%s %i %i", mon, &day, > > &year); > > + if (fields == 3) > > + { > > [snip] > > > + } > > shouldn't we return 0 in case the second test fails ? > > > + } > > + } > > + // format: [rest - year][0-12 - month][0-31 - day][0-23 - hrs][0-59 - > > sec] return _eina_hamsters; > > } > > Vincent > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Thu, 13 Aug 2009 07:33:07 +0200 (CEST) Vincent Torri said: hamsters need no initting! > also eina_hamster_init() is not called in eina_init() :-) poor hamsters ! > > (and eina_tiler init() as well) > > Vincent > > On Thu, 13 Aug 2009, Vincent Torri wrote: > > > > > On Wed, 12 Aug 2009, Enlightenment SVN wrote: > > > >> +fields = sscanf(_eina_hamster_time, "%02i:%02i:%02i", &hrs, &min, > >> &sec); > >> +if (fields == 3) > >> + { > >> + _eina_hamsters = (hrs * 60) + min; > >> + fields = sscanf(_eina_hamster_date, "%s %i %i", mon, &day, > >> &year); > >> + if (fields == 3) > >> + { > > > > [snip] > > > >> + } > > > > shouldn't we return 0 in case the second test fails ? > > > >> + } > >> + } > >> + // format: [rest - year][0-12 - month][0-31 - day][0-23 - hrs][0-59 - > >> sec] return _eina_hamsters; > >> } > > > > Vincent > > > > -- > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > > trial. Simplify your report design, integration and deployment - and focus > > on what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > ___ > > enlightenment-devel mailing list > > enlightenment-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > -- > > Ce message a été vérifié par MailScanner > > pour des virus ou des polluriels et rien de > > suspect n'a été trouvé. > > Message délivré par le serveur de messagerie de l'Université d'Evry. > > > > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
also eina_hamster_init() is not called in eina_init() :-) poor hamsters ! (and eina_tiler init() as well) Vincent On Thu, 13 Aug 2009, Vincent Torri wrote: On Wed, 12 Aug 2009, Enlightenment SVN wrote: +fields = sscanf(_eina_hamster_time, "%02i:%02i:%02i", &hrs, &min, &sec); +if (fields == 3) + { + _eina_hamsters = (hrs * 60) + min; + fields = sscanf(_eina_hamster_date, "%s %i %i", mon, &day, &year); + if (fields == 3) + { [snip] + } shouldn't we return 0 in case the second test fails ? + } + } + // format: [rest - year][0-12 - month][0-31 - day][0-23 - hrs][0-59 - sec] return _eina_hamsters; } Vincent -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé. Message délivré par le serveur de messagerie de l'Université d'Evry. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Wed, 12 Aug 2009, Enlightenment SVN wrote: > +fields = sscanf(_eina_hamster_time, "%02i:%02i:%02i", &hrs, &min, > &sec); > +if (fields == 3) > + { > + _eina_hamsters = (hrs * 60) + min; > + fields = sscanf(_eina_hamster_date, "%s %i %i", mon, &day, > &year); > + if (fields == 3) > + { [snip] > + } shouldn't we return 0 in case the second test fails ? > + } > + } > + // format: [rest - year][0-12 - month][0-31 - day][0-23 - hrs][0-59 - sec] >return _eina_hamsters; > } Vincent -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Tue, 06 Jan 2009 02:02:49 +0900 (JST) Naruto TAKAHASHI said: ok. in svn - but modifying cflags. > Hi, Michael. > > thank you, advice. > > I move "-fno-strict-aliasing" flag to configure.ac. > > Best Regards. > -=-=-=-=-=-=-=-=- > Naruto TAKAHASHI > tnar...@gmail.com > > From: Michael Jennings > Subject: Re: [E-devel] E SVN: raster trunk/eina/src/lib > Date: Sun, 4 Jan 2009 22:10:11 -0800 > > > On Wednesday, 31 December 2008, at 19:09:48 (-0800), > > Enlightenment SVN wrote: > > > >> -...@eina_cflags@ > >> +...@eina_cflags@ \ > >> +-fno-strict-aliasing > > > > This breaks portability. If this flag is needed, there must be a > > configure.ac test for the acceptability of this flag. > > > > Michael > > > > -- > > Michael Jennings (a.k.a. KainX) http://www.kainx.org/ > > Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org) > > --- > > "...in order to secure the safety of the public while traveling on > > public roads...it shall be unlawful for any person to drive, propel, > > or run any vehicle in, upon, and along any of the public roads in > > this county." -- Montgomery County, Mississippi, statute > > > > -- > > ___ > > enlightenment-devel mailing list > > enlightenment-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Tue, 6 Jan 2009, Naruto TAKAHASHI wrote: Hi, Michael. thank you, advice. I move "-fno-strict-aliasing" flag to configure.ac. it's a compiler flag, not a preprocesor flag, so should be in a _CFLAGS variable, not a _CPPFLAGS one Vincent Best Regards. -=-=-=-=-=-=-=-=- Naruto TAKAHASHI tnar...@gmail.com From: Michael Jennings Subject: Re: [E-devel] E SVN: raster trunk/eina/src/lib Date: Sun, 4 Jan 2009 22:10:11 -0800 On Wednesday, 31 December 2008, at 19:09:48 (-0800), Enlightenment SVN wrote: -...@eina_cflags@ +...@eina_cflags@ \ +-fno-strict-aliasing This breaks portability. If this flag is needed, there must be a configure.ac test for the acceptability of this flag. Michael -- Michael Jennings (a.k.a. KainX) http://www.kainx.org/ Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org) --- "...in order to secure the safety of the public while traveling on public roads...it shall be unlawful for any person to drive, propel, or run any vehicle in, upon, and along any of the public roads in this county." -- Montgomery County, Mississippi, statute -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé. Message délivré par le serveur de messagerie de l'Université d'Evry. -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
Hi, Michael. thank you, advice. I move "-fno-strict-aliasing" flag to configure.ac. Best Regards. -=-=-=-=-=-=-=-=- Naruto TAKAHASHI tnar...@gmail.com From: Michael Jennings Subject: Re: [E-devel] E SVN: raster trunk/eina/src/lib Date: Sun, 4 Jan 2009 22:10:11 -0800 > On Wednesday, 31 December 2008, at 19:09:48 (-0800), > Enlightenment SVN wrote: > >> -...@eina_cflags@ >> +...@eina_cflags@ \ >> +-fno-strict-aliasing > > This breaks portability. If this flag is needed, there must be a > configure.ac test for the acceptability of this flag. > > Michael > > -- > Michael Jennings (a.k.a. KainX) http://www.kainx.org/ > Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org) > --- > "...in order to secure the safety of the public while traveling on > public roads...it shall be unlawful for any person to drive, propel, > or run any vehicle in, upon, and along any of the public roads in > this county." -- Montgomery County, Mississippi, statute > > -- > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel Index: src/lib/Makefile.am === --- src/lib/Makefile.am (revision 38463) +++ src/lib/Makefile.am (working copy) @@ -6,8 +6,7 @@ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -...@eina_cflags@ \ --fno-strict-aliasing +...@eina_cflags@ lib_LTLIBRARIES = libeina.la Index: configure.ac === --- configure.ac (revision 38463) +++ configure.ac (working copy) @@ -283,6 +283,12 @@ EINA_CFLAGS="${EINA_CFLAGS} -Wall -W -Wextra" # -Werror fi +GCC_MAJOR_VERSION=`$CC -dumpversion | sed "s/\..*//"` + +if test "$GCC_MAJOR_VERSION" = "3" ; then + EINA_CFLAGS="${EINA_CFLAGS} -fno-strict-aliasing" +fi + AC_SUBST(EINA_CFLAGS) -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Wednesday, 31 December 2008, at 19:09:48 (-0800), Enlightenment SVN wrote: > -...@eina_cflags@ > +...@eina_cflags@ \ > +-fno-strict-aliasing This breaks portability. If this flag is needed, there must be a configure.ac test for the acceptability of this flag. Michael -- Michael Jennings (a.k.a. KainX) http://www.kainx.org/ Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org) --- "...in order to secure the safety of the public while traveling on public roads...it shall be unlawful for any person to drive, propel, or run any vehicle in, upon, and along any of the public roads in this county." -- Montgomery County, Mississippi, statute -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/eina/src/lib
On Wed, Oct 29, 2008 at 9:12 PM, Enlightenment SVN <[EMAIL PROTECTED]> wrote: > Log: > add error catching and output if mempool alloc/init fails. raster, please use EINA_ERROR_P*() -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: [EMAIL PROTECTED] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel