oe-alliance / ofgwrite

ofgwrite from Betacentauri: Based upon: mtd-utils-native-1.5.1
GNU General Public License v2.0
7 stars 16 forks source link

Use correct(?) error variable for test. #3

Closed original-birdman closed 7 years ago

original-birdman commented 7 years ago

This code is using 'bb_errno', but that is a pointer, so the compiler produces a warning (which is how I noticed it). I suspect it should use errno (as the rest of the ofgwrite code does). But it's possible(?) that it should be *bb_errno, although nothing else uses that - beyond it being declared.

I don't have any example of the code actually being used...

betacentauri commented 7 years ago

Hi,

I use busybox code. And busybox defines bb_errno: https://github.com/oe-alliance/ofgwrite/blob/master/busybox/include/libbb.h#L322 I took the code from busybox and have modified it in only few places. This is I think one of the places. I had to comment the part

undef errno

define errno (*bb_errno)

as I otherwise had problems.

You mean this warning? busybox/libbb/remove_file.c:19:16: warning: comparison between pointer and integer [enabled by default]

betacentauri commented 7 years ago

Very strange. I thought remove_file.c is original busybox source code, but it seems I have changed that :-(

So it seems your right. I'll check that and will merge pull request when I get no problems compiling the code.

betacentauri commented 7 years ago

Thanks for PR!