Um, no. 'long' is precisely one of the types that is different size between 32
and 64 bit. See:
https://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/64bitPorting/transition/transition.html
The warning is correct. In 32 bit, UInt64 -> long is truncation.
---
Reply to this
Might I suggest a comment in the code to that effect? On the surface it looks
like one of those "add a cast to shut up the compiler" things. :(
---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/commit/b5acea3591ee713ec3392e8d3c8ba59e848d8641#commitcomment-
I just assumed change the session id to a uint64_t would be an API/ABI
breakage... but didn't look...
---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/commit/b5acea3591ee713ec3392e8d3c8ba59e848d8641#commitcomment-3770292
---
would be in better shape.
Sean
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Bound
more portable?
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal,
() for the thread it creates.
It's very rare on Mac OS to drop to mach threads, I'm not sure the
mach_thread_self number is particularly meaningful to anyone doing debugging.
--
Sean McBride, B. Eng s...
out...
- the pthread_getname_np name
Mac developers may appreciate that the same identifiers be shown by libusb.
See:
<http://developer.apple.com/library/mac/documentation/IDEs/Conceptual/Xcode4TransitionGuide/Debugging/Debugging.html#//apple_ref/doc/uid/TP40009984-CH3-SW39>
--
___
d be much easier with CMake :)
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
-
robably explains that.
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
---
27;! :)
Mac OS X 10.5 & 10.6 have autoconf 2.61. I propose that be the min requirement.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.c
Or use CMake, which abstracts the problem. That way, the CMake folks get to
worry about keeping up-to-date with VS and Xcode project formats.
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Research
eral.
I always found this explanation of strict aliasing to be quite useful:
<http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html>
Cheers,
--
Sean McBride, B. Eng s...@ro
while ((dev = list[i++]) != NULL)
> ^ ~
Have you looked at the HTML that scan-build generates? It's usually much
easier to look at that, since it shows the flow control that gets you to the
condition where the value is garbage.
--
___
ores that flag when linking, I believe.
Perhaps this can be fixed in libusbx's makefiles somehow...
Also, does libusbx actually need GNU extensions? Does it build with -std=c99
instead?
--
____
Sean McBride, B. Eng
together for display. Volunteers could set up
nightly submissions with their favourite compilers & favourite warning
settings. Something like this:
<http://open.cdash.org/index.php?project=CMake>
--
____
Sean McBride, B.
On Fri, 22 Jun 2012 12:44:29 +0100, Pete Batard said:
>On 2012.06.21 21:23, Sean McBride wrote:
>> It would be nice to have nightly builds of libusbx where the resulting
>errors/warnings are gathered together for display.
>
>I agree that it would be nice. However,
>
>
, so it doesn't make sense that it would ignore it. I think
clang's error message "argument unused during compilation" is misleading us.
If you build with verbose on, I think you'll find it's the linking invocation
that's causing this message.
Cheers,
-
?
But it is indeed a harmless warning, though distracting.
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal,
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal, Québec
le', and shouldn't be
encouraged.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Soft
ough. :(
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal
participate in this thread, as I don't like flame wars, but a
piece of honest constructive criticism: if your project depends on libusbx (or
any other project) why did you not try the release candidates to catch this
problem before release? Was the RC peri
libusbx with clang and -fcatch-undefined-behavior, I triggered
this problem.
Could list_entry be reworked to use offsetof instead?
Thanks,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Research
ample:
<http://open.cdash.org/index.php?project=CMake>
We would contribute nightly builds on 10.5, 10.6, 10.7, 10.8, and Ubuntu 12,
using different versions of gcc and clang.
Cheers,
--
____
Sean McBride, B. Eng s.
mprovements, as it should help ensure they find their way into
>a release.
OK, I'll use that next time... it just seems like something that would take
less time to fix than to create a bug report (for someone that knows the code).
Cheers,
--
___
t;proposed it), but I'd like to hear what others have to say.
I think I'll start a new thread about that...
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.
kefiles, it seems like it would be much less maintance.
Personally I much prefer CMake to autotools, but of course everything has its
pros and cons. Is there something CMake doesn't support that libusbx needs?
Cheers,
--
___
ference? What is included with the "released" version that is
not included with git, and why?
>This is not the same with CMake.
True.
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
know what state
it's in...
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Develop
king libusb_transfer's 'buffer' void*. This silences the warning, but
doesn't really fix anything. This will also require other casts elsewhere,
since pointer arithmetic on void* is also not kosher.
3) ???
Thanks,
--
__
h it.
>Homebrew [1] is a very nice tools for installing external tools on Mac OS X.
>$ brew install libtool
On Mac at least, that's now 3 dependencies:
- install Xcode
- install homebrew
- 'brew install' libtool
vs
- install Xcode
- install CMake
Cheers,
--
___
237a20b3378b4ea1>
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
--
Don
ould be annoying.
From my perspective as a Mac user though, neither comes by default, so it's a
wash.
If libusbx provided binaries, "users" could just use them, and "developers"
could handle building with whatever tool.
Cheers,
--
r whatever version of VS/Xcode *he has*, and use that to build the libusbx
library.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software
ater only when/if necessary, like so:
<https://github.com/seanm/libusbx/commit/8b8545c26ba2246d4589b4115ee175d4a8ce4358>
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Research
On Fri, 12 Oct 2012 23:25:14 +0100, Pete Batard said:
>On 2012.10.12 22:06, Sean McBride wrote:
>> 3) ???
>
>3) Look at how other software that uses -Wcast-align handles the same issue.
>
>There's probably hardly any piece of significant C code out there that's
unction now, being a #define macro
won't change much.
>Another solution would be our unpopular friend, the anonymous union for the
>transfer buffer.
Aren't those new in C11? libusbx seems to be mostly C89. Even C99 usage is
guarded by #ifs.
Cheers,
--
__
u have a better
chance of seeing some huge value *before* you invoke implementation-defined
behaviour of signed integer truncation.
As you say, such a timeout would be so long it hardly matters. I don't much
care.
Cheers,
--
the transition, there was also 'llvm gcc' which is a hybrid with the
gcc front end and llvm backend, that's the above.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Research
x27;-L/Users/xiaofanc/work/libusbx/ludovic/libusbx/libusb/.libs'
He has hardcoded a path to his own disk in his Xcode project.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Research
On Mon, 15 Oct 2012 22:58:01 -0400, Pete Batard said:
>On 15 October 2012 12:15, Sean McBride wrote:
>>>3) Look at how other software that uses -Wcast-align handles the same issue.
>>
>> I'm not exactly sure what you're asking...
>
>I was suggesting that
cast they are doing is no good. But I didn't even suggest
this because it would change public API.
Again, for now, I just want the public libusb.h not to cause this warning in my
own code that is otherwise -Wcast-align clean.
Cheers,
--
__
hat must be <>-style instead of
""-style? It seems to me libusb should include it's own files with "" not <>.
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Resea
version that
supported Mac OS X 10.5).
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software
alue text files that Xcode
projects refer to. It would mean a few extra files in git, but a good
tradeoff. Any objections?
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue
's hard to
diff and hard to comment, and settings need to be duplicated between targets.
Ludovic, I invite you to sync with mine.
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Research
yment target, and arches.
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer
that probably won't be true in future Xcodes.
How about we add some instructions and a place to specify custom values, like
this:
<https://github.com/seanm/libusbx/commit/662e2e4ecb64c206ac4b5239dcf8d00959428ea1>
Cheers,
--
_
icket/150>
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal, Qu
han fix it in libusb and then we'd pull from
him... vice versa works too.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer
bx itself, you might ask here
instead:
<https://lists.apple.com/mailman/listinfo/usb>
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-resear
ugh of course there are always bugs.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer M
jects that have static storage duration."
gcc's -Wmissing-field-initializers is overly noisy; good discussion here:
<http://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru>
Cheers,
--
_
just pass the new io_service_t to
libusbx...
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Sof
om/labjack/exodriver>
Sounds like it may need updating for 1.2.
Is this hotplug API opt-in? libusbx won't start observing the comings and
goings of all USB devices by default I hope?
Cheers,
--
Sean McBride, B. Eng
SB device is plugged in?
My app only communicates with one particular USB device, and I don't much like
the idea of my process running code whenever the user happens to plug in a
keyboard, mouse, USB key, or other unrelated thing.
Cheers,
--
ly
if the code is multithreaded, which of course is even harder to test well.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Devel
sn't seem right for libusb to be
changing the process' locale settings.
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Devel
;in NULL it queries the current settings, quoting from the manpage:
My bad. Sorry for the noise. More coffee...
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-res
.com/libusbx/libusbx/wiki/FAQ>
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Develo
st "[libusb]"?
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Mon
ating into master:
<http://code.google.com/p/gerrit/>
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-resear
((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__
>= 2)))
#pragma GCC diagnostic pop
#endif
This makes it clear a temporary hack is in place until the API can be fixed.
Cheers,
--
Sean McBride, B. Eng
On Tue, 2 Jul 2013 23:18:12 +0400, Paul Fertser said:
>On Tue, Jul 02, 2013 at 02:43:54PM -0400, Sean McBride wrote:
>> I don't think Paul's patch should be committed, at least not as-is.
>> It adds strange double casts (with no comment) that future readers
>>
** \ingroup poll
* blah blah blah.
*
* \param ctx the context to operate on, or NULL for the default context
* \see \ref mtasync
*/
void API_EXPORTED libusb_unlock_events(libusb_context *ctx)
What is desired here? Only \see? Only \ref?
Thanks,
--
______
On Thu, 1 Aug 2013 06:28:27 +0200, Ludovic Rousseau said:
>I still have 2 commits from Sean in my Xcode branch:
>
>- Core: defensive programming
>https://github.com/LudovicRousseau/libusbx/commit/
>5da4949cffacf1a19aeaf62ce796019daa50c49d
>Not Xcode related. Maybe we can dro
econds, and am not fully convinced
myself. After all, the very first thing darwin_get_cached_device() does is:
ret = 0;
*cached_out = NULL;
If those initial conditions are not changed (in some freaky branch) then the
quoted checks above are not equivalent. But I trust you know the code well!
Cheers,
-
OS X 10.8.5 on Intel. I didn't try
more than that though.
Isn't there supposed to be an Xcode folder in there? (There isn't.)
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-
atic analyzer. It's code
path dependant, and really you need the Xcode GUI to follow the flow. Nathan,
could you look?
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Research
bx/commit/29e35526c76801479d158c484ec863615638aee8>
>I will take a look at both 2 and 3 today.
Thanks!
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Sof
just merge my 2
character change please. :)
Cheers,
--
____
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Soft
memory after it is freed
>>
>> This could be a false positive as it's from the static analyzer. It's
>code path dependant, and really you need the Xcode GUI to follow the
>flow. Nathan, could you look?
>
>I will take a look at both 2 and 3 today.
Nathan,
Jus
see if it identifies a real issue or not.
Agreed, it's not at all clear to me either. The analyzer sometimes catches
amazing things and sometimes is amazingly wrong. Thanks for looking into it.
Cheers,
--
Sea
ses).
Cheers,
--
Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer Montréal, Q
rc1.tar.bz2
>
>Please test and let us know if you find any issues. We plan to release a
>final version of 1.0.20 in the next 2-3 weeks.
So it is perhaps time to release an rc2...?
Cheers,
--
Sean McBride, B. Eng
75 matches
Mail list logo