`.travis.yml` can be updated to remove redundant flags. Also, I did something stupid there; should have written
```
CFLAGS='blah blah' make
```
instead of
```
make CFLAGS='blah blah'
```
By the way, just a FYI, `stat(1)` from coreutils uses `PRIuMAX` and `PRIxMAX` for `dev_t`. https://github.com/coreutils/coreutils/blob/master/src/stat.c
> As long as it's an upcast we are safe. Seems like the best option right now.
I'm slightly uncomfortable with casting to unsigned long because `dev_t` surely isn't the only opaque type in `struct stat`... But I suppose ugly code is not as bad as ugly compiler warnings 😅
No, the key generation was for uploading artifacts. Since you already enabled https://travis-ci.org/jarun/nnn, now you just need to push anything to any branch.
> ... so there are crazy backlogs on workdays...
Well, immediately after saying that my build https://travis-ci.org/zmwangx/nnn/builds/218196438 completed. Rather surprising.
Test on Travis
==============
This PR sets up Travis testing on Ubuntu Trusty and macOS, with gcc and clang on both platforms. Warnings are turned into errors. See https://travis-ci.org/zmwangx/nnn/builds/218196438 for instance.
Notes:
1. I'm using the Trusty image because the Precise image comes with GCC 4.6.3, and the error messages are just abysmal.
2. Travis's macOS infrastructure is not big enough to handle its demand in real time, so there are crazy backlogs on workdays that IIRC are usually only cleared past midnight (in the U.S.). See https://www.traviscistatus.com/.
Works, but warnings due to `st_dev` being `int` on macOS, in addition to other warnings:
```c
nnn.c:752:28: warning: format specifies type 'unsigned long' but the argument has type 'dev_t' (aka 'int') [-Wformat]
sprintf(buf, "%lxh/%lud", sb->st_dev, sb->st_dev);
~~~ ^~~~~~~~~~
%x
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
^~~~~~~~~~~
nnn.c:752:40: warning: format specifies type 'unsigned long' but the argument has type 'dev_t' (aka 'int') [-Wformat]
sprintf(buf, "%lxh/%lud", sb->st_dev, sb->st_dev);
~~~ ^~~~~~~~~~
%d
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
^~~~~~~~~~~
```
I recommend Travis.
Is this specific to Windows, or does it happen with FF and gang on *nix too? And if it's the latter, does `new=2` fix it on *nix?
To troubleshoot, one should just go read https://github.com/python/cpython/blob/master/Lib/webbrowser.py, which is pretty straightforward. If you can figure out the problem and cook up a patch, then great, submit a pr to python/cpython; if you can't, report it to http://bugs.python.org/.
> I may look at some alternative way of handling this and throw webbrowser out of the window
I recommend not wasting time on cross-platform IPC.