rubund / graywolf

Other
107 stars 36 forks source link

Fix warnings #23

Closed StefanBruens closed 6 years ago

rubund commented 6 years ago

thanks

rubund commented 6 years ago

Hi Stefan,

I had to revert the merge of this pull request because bug reports started ticking in, and I do unfortunately not have time to dive into the details now.

Better with a functional version of graywolf with lots of warnings during compilation, than with erroneous functionality.

I am quoting some details from Tim Edwards below:

(1) src/twsc/readcell_l.h line 523. yylook() returns a value (see line 67: "while((nstr = yylook()) >= 0)") and so should not be cast to type void. Line 523 should be:

   INT yylook(){

I noticed that in the various graywolf applications, there are a number of *_l.h files, all of which define yylook(). In the current version of graywolf, these are variously typed INT, int, void, and (nothing). INT should be equivalent to int as far as I know, and I think there is only the one instance of the use of void. But there are still several implicit type casts.

(2) src/twsc/coarseglb.c line 407: space_for_feed() returns a value (see line 136, "shift = space_for_feed()") and so should not be cast to type void. Line 407 should be:

   INT space_for_feed()

Otherwise graywolf goes into an infinite loop during global route calculations at the end.

Best regards, Ruben

StefanBruens commented 6 years ago

Would have been better if you told me immediately, then I could have provided a patch on top. See #25 now ...