bb33bb / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 1 forks source link

../../libnfc/nfc-internal.h:111:5: warning: "_BYTE_ORDER" is not defined #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configuure
2. make

What is the expected output?
No compiler warning

What do you see instead?
Making all in drivers
  CC     libnfcdrivers_la-acr122_pcsc.lo
In file included from acr122_pcsc.c:41:
../../libnfc/nfc-internal.h:111:5: warning: "_BYTE_ORDER" is not defined
../../libnfc/nfc-internal.h:111:20: warning: "_LITTLE_ENDIAN" is not defined

What version of the product are you using? On what operating system?
SVN version

Please provide any additional information below.
Writting code that is dependant of the byte ordering is a bad idea 
(BUFFER_APPEND_LE macro in nfc-internal.h). The code should be the same for all 
platforms.

See http://commandcenter.blogspot.fr/2012/04/byte-order-fallacy.html (from Rob 
Pike)

Original issue reported on code.google.com by ludovic....@gmail.com on 12 May 2012 at 8:31

GoogleCodeExporter commented 9 years ago
Regarding libnfc, I will remove this chunk of code : we don't use it.

BTW, it comes from libfreefare and is used there.

I read the link you point, I read the libfreefare code and I don't know what is 
wrong...

I don't understand in libfreefare context how we can provide a better code. 
Little endian is required by some targets...

BTW, I will close this issue. Feel free to reopen one on nfc-tools about 
libfreefare.

Original comment by romu...@libnfc.org on 27 Sep 2012 at 7:33

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1456.

Original comment by romu...@libnfc.org on 27 Sep 2012 at 7:36