1

error #1696: Implicit pointer conversion changes byteorder of the pointed-to types from "bigendian int" to "int" if((processid = forkpty{{int*)&(execData->mFd)

I have multiple files being compiled by a single makefile. One of those files say xyz.cis giving me byte-order error I tried to resolve such errors using this https://software.intel.com/en-us/node/628915

But this one is sticky. No matter what I do it didn't go away.

Attempts Made:

1) Went through https://software.intel.com/en-us/node/628915 but nothing helped. 2)if I take this file say xyz.c out of the makefile and comment it then it gives me undefined reference to lots of functions which are used elsewhere. So this is obviously not a solution.

Need is to ignore this warning so I Wonder if there is a way to make-Wnoerror for a particular file being compiled inside a Makefile.

Amninder Singh
  • 321
  • 1
  • 2
  • 20
  • 2
    Have you seen the answer _[here](https://stackoverflow.com/q/6321839/645128)_ ?... (_[this answer](https://stackoverflow.com/a/6321926/645128)_ in particular I think addresses your question best) – ryyker Jun 23 '17 at 15:01
  • Note that the code (`if((processid = forkpty{{int*)&(execData->mFd)`) doesn't compile whether you ignore `-Werror` or not; it is invalid because of the `{` open braces at the start of what's meant to be a function call and cast, and the three missing `)` close brackets (parentheses). That's 3 assuming the `{` are changed to `(`. – Jonathan Leffler Jun 23 '17 at 15:15
  • @ryyker You got me, bro! Thanks.. – Amninder Singh Jun 27 '17 at 11:06
  • @ryyker but what exactly this isystem is doing instead of using I here? – Amninder Singh Jun 27 '17 at 11:06
  • _[Here is another answer discussing same thing](https://stackoverflow.com/a/3371528/645128)_. You just have to read the documentation at this point, then experiment. Google GCC compiler (or linker) options. – ryyker Jun 27 '17 at 13:05

1 Answers1

3

There are two possible options,

  1. Create a rule for the specific file in the Makefile, and don't pass -Werror when compiling it.

  2. Use what is described in this answer.

    #pragma GCC diagnostic ignored "-W(your specific warning)"
    

    you can re-enable the warning later if you like.

Iharob Al Asimi
  • 52,653
  • 6
  • 59
  • 97