Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

char* to int conversion truncation warning on HP-UX in 64-bit mode #12

Open
GoogleCodeExporter opened this issue Dec 8, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. execute "cc +DD64 -c -I../include cmockery.c"

What is the expected output? What do you see instead?

Nothing should be printed but it says:

"cmockery.c", line 1657: warning #2069-D: integer conversion resulted in
          truncation
                                assert_false("BUG: shouldn't be here!");

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

1. cmockery-0.1.2
2. HP-UX 11 IA64 v3

uname -a

HP-UX hpitv3 B.11.31 U ia64 0383467329 unlimited-user license

cc --version

cc: HP C/aC++ B3910B A.06.22 [Nov 14 2008]

Please provide any additional information below.

The statement causing the warning should be fixed anyway. The patch below 
does it as the HP-UX workaround:

--- cmockery.c  Sat Aug 30 02:55:53 2008
+++ cmockery.c  Tue Jul 21 10:46:56 2009
@@ -1650,7 +1650,9 @@
                }
                break;
            default:
+#ifdef _HPUX
                assert_false("BUG: shouldn't be here!");
+#endif
                break;
            }

Using _HPUX macro allows to compile on HP-UX without this warning.

Original issue reported on code.google.com by ade...@gmail.com on 21 Jul 2009 at 10:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant